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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a variable that contains two words to a combobox

Status
Not open for further replies.

MrE4U

Programmer
Mar 29, 2003
11
0
0
US
Here is my problem:

set testvar "Testing Testing"
ComboBox .updateentry.cupdate -values $testvar

and the result is:

Testing
Testing

in the combobox, but I want it to do this:

Testing Testing

I can set it up has a literal and it works such as the following:

ComboBox .updateentry.cupdate -values {"Testing Testing"}

and the result in the Combobox is:

Testing Testing

I have been messing around with the brackets and quotes and I cannot get it to work right.
 
The reason the following is working when you set it up as a literal - ComboBox .updateentry.cupdate -values {"Testing Testing"} - is because the value is defined as 1 element list.

In your inital set testvar "Testing Testing", it's nothing more then a string.

For kicks, try this for now ...

set testvar {"Testing Testing"}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top