Bug in Tk Listbox

Run the script below. Clicking on the window will fire off <> events even though the widget is disabled. Keyboard actions do not fire this event. import Tkinter as tkidef selection_changed(event): print ‘Selection changed’root = tki.Tk()listbox = tki.Listbox(root, selectmode=tki.BROWSE)listbox.pack(side=’left’, fill=’both’, expand=True)listbox.bind(‘<>’, selection_changed)listbox.config(state=tki.DISABLED)root.mainloop() Python bug ticket:  18506  (The python guys bounced me to the Tcl/Tk guys)Tcl/Tk… Read More Bug in Tk Listbox

Stacking event bindings in tkinter

To stack events in Tkinter one should use the add=’+’ keyword (from here): widget.bind(“”, callback1)widget.bind(“”, callback2, add=”+”) If you don’t use the add=’+’ in the second call, then the first callback binding gets overwritten