Re: popup menu

On Thu, 2003-12-04 at 13:21, Thomas Bayen wrote:

In my program I want to open a popup menu when the user clicks a button.
It's a bit like an optionmenu but not really the same so I do not want
to use an optionmenu.

(This is not the same problem I had some time ago with my self-made
popup window, asking for help on this list. This time I try to use just
the "standard" popup menu.)

There is an example in C in the docs on page but I can't make
it work with perl. I have no event (because the "clicked" signal of
Gtk2::Button does not give me one). But the function
gtk_get_current_event_time() mentioned in
seems not to exist. :-(

take a look here the current_event_xxx functions are bound:
so you should be able to use it in your situation.

the other option would be to connect a signal handler to event for the
widget with an event mask letting through only the ones you want. that
signal provides the event as a parameter. i thought there was an example
of this somewhere but i can't seem to find it at the moment. 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]