how to display text entered in a textbox?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • peachdot
    New Member
    • Aug 2010
    • 20

    how to display text entered in a textbox?

    hi,

    How do i display text that a user entered in textbox as a display label?

    Basically,i just want to display it as a summary of the choices made.
  • Mariostg
    Contributor
    • Sep 2010
    • 332

    #2
    What GUI are you using? WxPython, Qt, Tkinter... You don't provide much detail.
    If you explain a bit what you have done so far it might be easier to help.

    Comment

    • peachdot
      New Member
      • Aug 2010
      • 20

      #3
      Hi there,

      im using SharpDevelop to create my GUI. but i found it's quite hard to search online tutorial or forum for SharpDevelop.

      i used tabControl. In first tabpage, user need to fill in the textboxs(ie:Nam e,id number,age,addr ess,etc.) Then "Next" button click, a summary of what have been entered in 1st tabpage need to be display in second tabpage. i tried using label to display,

      self._label12.T ext = self._textBoxNa me.Text
      self._label14.T ext = self._textBoxAg e.Text

      but it doesnt work.. Can anyone help me with this? or is there a better way to do this?

      Comment

      • Mariostg
        Contributor
        • Sep 2010
        • 332

        #4
        Sorry, I don't use SharpDevelop. Can't help.

        Comment

        • peachdot
          New Member
          • Aug 2010
          • 20

          #5
          how to display text entered in a textbox?

          Hi there,

          i used tabControl. In first tabpage, user need to fill in the textboxs(ie:Nam e,id number,age,addr ess,etc.) Then "Next" button click, a summary of what have been entered in 1st tabpage need to be display in second tabpage. i tried using label to display,

          self._label12.T ext = self._textBoxNa me.Text
          self._label14.T ext = self._textBoxAg e.Text

          but it doesnt work.. Can anyone help me with this? or is there a better way to do this?

          thanks-
          -im using SharpDevelop to create my GUI.

          Comment

          • bvdet
            Recognized Expert Specialist
            • Oct 2006
            • 2851

            #6
            I am not familiar with #develop. In Tkinter you would initialize a StringVar() object for each Entry field. The object would be associated with the Entry by assigning it to the Entry textvariable option. When the user enters a value in an Entry, the value can be obtained with the StringVar object's get() method. Something like this:
            Code:
            var = StringVar()
            Entry(master, textvariable=var)
            
            self._label12.Text = self.var.get()
            You need to find out what methods and options are available.
            Last edited by bvdet; Oct 15 '10, 02:00 AM.

            Comment

            Working...