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

Re: Re:the correct way to do pop up menus?



> First you need to make a attach the button-release-event(or
> button-press-event)
> to a callback, somewhere:

Or just use gnome_popup_menu_attach (GtkWidget *popup, GtkWidget *widget,
                                                                 gpointer
data)
which attaches the menu "popup" to the widget "widget", and whenever the
right mouse button is pressed over that widget, up pops the popup menu.

The GTK way is to connect to the button-release-event like you said, but
just to us gtk_menu_popup (GtkMenu *menu, GtkWidget *parent_menu_shall,
GtkWidget *parent_menu_item, GtkMenuPosition func, gpointer data, guint
button, guint activae_time)
Look at the gtkoptionmenu.c to see how to use this function (it's not hard,
it just has loads of strange parameters).

Iain



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