sxn02 at yahoo.com
Sun Sep 10 19:42:21 CEST 2006
lb.curselection() won't return an integer, but a tuple of strings. Also, a StringVar receives a new value with the set() method. So, you'll have to write something like:
This will grab the first value from the tuple, convert it in integer, and pass it to lb.get() to extract the line in your Listbox, and set it in your Entry via the StringVar. If you allow multiple selections from your Listbox, you may have more than one value in idx, and you'll have to decide how you intend to process them.
Check any of these (or both):
They're both easy to follow, and you'll save more time, than asking one little think at a time, and then waiting for someone to answer.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list