Listbox.. ACTIVE-item is the one selected previously..

Fredrik Lundh fredrik at pythonware.com
Mon Nov 1 17:46:52 CET 1999


Andrew Markebo <andrew.markebo at telelogic.se> (or is it Eskilsson?) wrote:
> I want to have a listbox, and when the user clicks on one item in it,
> he gets the value selected 'published' somewhere.. with the small
> program included below.. If it is launched, and the user selects the
> letters in order I would assume the result to be "abcde", but what I get is:
> "aabcd", after the first selection, ACTIVE is lagged.. 
> 
> What have I missed??

by default, instance bindings are called *before* class
bindings -- and it's the class bindings that implement
standard behaviour.

easy solution: use double click instead.

slightly harder solution: use bindtags to swap
instance and class bindings.

best solution: instead of using instance bindings,
create your own binding class, and place it be-
fore the standard class bindings.

(sorry, no time for code samples today).

</F>





More information about the Python-list mailing list