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
<[EMAIL PROTECTED]> wrote in email:
| Hi,and sorry I forget tell you what I want exactly.
|
| My problem is
|
| example:
|
| when I write like you tell me:
|
| >>> idx=lb.curselection()
| >>> StringValue=lb.get(idx) <=== This
|
| THEN,ERROR IS:
|
| Traceback (most recent call last):
<[EMAIL PROTECTED]> Wrote:
| Hi,
| I need help about Tkinter.I want,when somebody click on some item in
| listbox,then
| in new entry widget must write that item
|
| Regards,
| Vedran
I have already covered the retrieval from the listbox in another thread.
You can set the entry box contents lik
Hi,
I need help about Tkinter.I want,when somebody click on some item in
listbox,then
in new entry widget must write that item
Regards,
Vedran
--
http://mail.python.org/mailman/listinfo/python-list