Louie Lu added the comment:
The problem cause by listbox.curselection(). When crossing from a listbox to
another listbox, it will trigger twice event.
The first time get a valid select tuple from curselection() (which will return
(index, label)), and the second time will generate empty tuple.
You should check curselection()'s tuple before passing into listbox.get(). The
easiest is to add a if stmt for lb_*_cur, for example:
def get_style(event):
# self.style.set(listbox_style.get(listbox_style.curselection()))
# ____TEST____ >
lb_sty_cur = listbox_style.curselection()
if lb_sty_cur:
lb_sty_get = listbox_style.get(lb_sty_cur)
self.style.set(lb_sty_get)
return
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30200>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com