[wxPython-users] wx.Choice and event handling

Robin Dunn robin at alldunn.com
Mon Feb 5 12:55:49 PST 2007


Basil Shubin wrote:
> Hi friends,
> 
> The task: there should be abillity in event handler to check previous 
> selection and process event only if old selection was differ from new 
> selection.
> 
> How it can be accomlished? How many way to that?
> 
> For now I have only one solution is to save selection in class variable 
> and then, on next event handling, compare it with new selection. 
> Therefore event will be processed depending on result of value comparing.
> 
> Maybe there is any other solution? Maybe I can somehow get previous 
> selection from event object or other...?

No, your solution is a good way to do it.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list