Unbinding Tkinter default bindings for Listbox

James Stroud jstroud at mbi.ucla.edu
Mon Jan 12 17:45:20 EST 2009


Roger wrote:
> I'm sorry for harassing the list but any suggestions would be greatly
> appreciated. =)

I just checked the behavior you are describing. It seems that you want 
to unbind the <Leave> event to stop the autoscrolling when you leave the 
listbox. E.g.:

from Tkinter import *
tk = Tk()
lb = Listbox(tk)
lb.pack()
tk.tk.call('bind', str(lb), '<Leave>', "break")
for i in range(12):
   lb.insert(END, str(i))


Sorry for not reading more carefully.

James



More information about the Python-list mailing list