Tkinter listbox clicking problem

Matthew Bonig mbonig at
Fri Sep 13 12:49:28 EDT 2002

Right now I have it bound so when a Tkinter listbox gets a <Button-1>
(lb.bind("<Button-1>", someFunc)) it calls function someFunc. Now,
someFunc() simply prints the curselection(). The problem is it's lagged...
if I first select list item 1 (index 0), and then 2, and then 3 (array
indexes 0,1,2) it prints out themout incorrectly.
(I have someFunc actually do some try, except stuff so I don't get uncaught
exceptions) Instead of printing 0,1,2 it prints "nothing selected", 0, 1.
The function get's called before the listbox updates it's selection markers!

Does anybody know how I could force listbox to update it's selection markers
so instead of printing "nothing selected, 0,1  it prints 0,1,2 like it

Matthew Bonig

More information about the Python-list mailing list