1

After creating a simple window/widget layout with Page (page.sourceforge.net) I found that the listbox curselection() call returns the proper index when releasing Button-1. When hit, it returns the previous index (the item which we just leave).

Becasue of some timer activities I'd like to get the clicked index at click-time, instead of release-time. Can somebody help me how could I do that? Thank you

stoqlt
  • 43
  • 1
  • 7
  • possible duplicate of [Getting a callback when a Tkinter Listbox selection is changed?](http://stackoverflow.com/questions/6554805/getting-a-callback-when-a-tkinter-listbox-selection-is-changed) – Bryan Oakley May 12 '12 at 02:08

1 Answers1

1

Bind to the event <<ListboxSelect>> instead of <1>, this event will fire after the current selection has been updated.

If you genuinely need for the binding to work literally on a press of the mouse button you will have to rearrange the order of the bind tags for the widget.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685