wxPython and EVT_UPDATE_UI

Vadim Zeitlin zeitlin at seth.lpthe.jussieu.fr
Wed Aug 2 14:18:28 EDT 2000


On Tue, 1 Aug 2000 20:38:27 -0500, Jonathan M. Gilligan <jonathan.gilligan at vanderbilt.edu> wrote:
>Can anyone explain how to use EVT_UPDATE_UI() properly to update a menu item
>in wxPython (or suggest another way to solve this problem)?

 Hello,

 I don't know why EVT_UPDATE_UI doesn't work for you, but it doesn't seem the
right way to do this anyhow as this handler is called during the idle time
processing and so by the time it is called you would have 2 menu items checked
anyhow - and then how can you decide what to do in it?

 Instead, I'd advise you to use EVT_MENU_RANGE() and uncheck all the items
except the one you just got the event for there.

 Regards,
VZ



More information about the Python-list mailing list