By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,621 Members | 1,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,621 IT Pros & Developers. It's quick & easy.

how to display text entered in a textbox?

P: 20
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.
Oct 7 '10 #1
Share this Question
Share on Google+
5 Replies


100+
P: 332
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.
Oct 7 '10 #2

P: 20
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:Name,id number,age,address,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.Text = self._textBoxName.Text
self._label14.Text = self._textBoxAge.Text

but it doesnt work.. Can anyone help me with this? or is there a better way to do this?
Oct 7 '10 #3

100+
P: 332
Sorry, I don't use SharpDevelop. Can't help.
Oct 7 '10 #4

P: 20
Hi there,

i used tabControl. In first tabpage, user need to fill in the textboxs(ie:Name,id number,age,address,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.Text = self._textBoxName.Text
self._label14.Text = self._textBoxAge.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.
Oct 7 '10 #5

bvdet
Expert Mod 2.5K+
P: 2,851
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:
Expand|Select|Wrap|Line Numbers
  1. var = StringVar()
  2. Entry(master, textvariable=var)
  3.  
  4. self._label12.Text = self.var.get()
You need to find out what methods and options are available.
Oct 7 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.