[pygtk] Help with gtk.Menu.popup
Pádraig Brady
P at draigBrady.com
Thu Nov 20 20:45:08 WST 2008
Ángel Alonso wrote:
> Hi, i need help with this function:
>
> http://www.pygtk.org/docs/pygtk/class-gtkmenu.html#method-gtkmenu--popup
>
> I need the activate_time but i need to get this param.
>
> Thanks and sorry about my english
If you specify the activate_time as 0 then the
popup menu will disappear immediately on a right click being
released for example. Usually you want the menu to remain
so that you can subsequently click entries on it.
Timing info is the only way GTK can decide whether
to leave the menu or not.
So you need to get the time from the event object
passed to your handler for the mouse click.
Here is an example from an app I wrote:
http://code.google.com/p/fslint/source/browse/trunk/fslint-gui?spec=svn55&r=55#1012
cheers,
Pádraig.
More information about the pygtk
mailing list