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:
idx=lb.curselection()StringValue.set(lb.get(int(idx[0])))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):
http://www.pythonware.com/library/tkinter/introduction/index.htmhttp://infohost.nmt.edu/tcc/help/pubs/tkinter/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.
Good luck!
Sorin