[pygtk] How to select a menuitem

Thomas Guettler hv at tbz-pariv.de
Mon Nov 20 20:03:54 WST 2006


Hi,

how can you select a menuitem with python code?

I want to remember the last menuitem the user took,
so that I can focus/select it the next time the menu
pops up.

something like this:

self.flagsmenu.popup(....)
if self.flagsmenu_lastitem:
    self.flagsmenu_lastitem.select() # menuitem

 Thomas Güttler


More information about the pygtk mailing list