On Mon, Jul 07, 2008 at 12:13:49PM -0700, gegard wrote: . . . > But I see that I get the index number of the selection _before_ I've moved > to a new selected item if I'm using the arrow keys. Another problem to > resolve. I guess there's code to learn from somewhere! . . . Yes. This is a well-known issue, that's been present for at least a decade, and apparently no one has ever put the answer in a readily accessible place.
And I am unlikely to do so in the next day. Briefly, you need to use bindtags to insert your custom bindings AFTER the standard bindings. For reasons that must seem obscure for the moment, your command is sequenced before the listbox does its own work of updating the selection; bindtag gives you the control to reverse that order. _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss