James Stroud wrote:
tk.tk.call('bind', str(lb), '<Leave>', "break")
Which is equivalent to
lb.bind('<Leave>', "break")
But I checked and overriding the default behavior of Listbox does not
work (tk.tk.call('bind', "Listbox", '<Leave>', "break")).
So I would subclass Listbox and do the bindings in the __init__:
class MyListbox(Listbox):
def __init__(self, *args, **kwargs):
Listbox.__init__(self, *args, **kwargs)
self.bind('<Leave>', "break")
James
--
http://mail.python.org/mailman/listinfo/python-list