Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New top level entry window

Status
Not open for further replies.

AndoSam

Technical User
Jul 14, 2010
16
GB
Hi,

I have created a program that opens up a new toplevel on a button press with additional options.
This new window has an entry widget that I would like to get the value out using:

Code:
toplevel .newWindow
.......<other code>........
set choice [.newWindow.choiceEntry]

Where <topLevelPath> is the name of top level created on the button press.
However, when this is run I get the error message ".newWindow.choiceEntry is an invalid command"

Any help would be much appreciated
 
If you want to scrape the text that's in the entry:
Code:
.newWindow.choiceEntry get

Much better I think is to assign a textvariable to the entry when it's created:
Code:
entry .newWindow.choiceEntry -textvariable varName

Then $varName is always "in the know".

_________________
Bob Rashkin
 
Many thanks, that seems to have done the trick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top