Re: Popup menus and Glade



On Thu, 5 Oct 2000, Lars Bensmann wrote:
I'm trying to get a popup menu when I right click on a clist. I created
the menu with Glade, got a pointer to it and now don't know what to do.

I tried all functions I could find, realize, map, show, draw_now. But
nothing happens. What's the right way to do it?

Lars,

Use gtk_menu_popup.

Here's a code snippet:

[in initialization code]

channels_popup = GTK_WIDGET(glade_xml_get_widget(menu_xml,
                "channels_popup"));


[in on_button_press]

if (event->type == GDK_BUTTON_PRESS && event->button == 3)
      gtk_menu_popup (GTK_MENU(channels_popup), NULL, NULL, NULL, NULL, 3,
                        event->time);

David




-- 
      __          _    __  David Helder - University of Michigan
  ___/ /__ __  __(_)__/ /  dhelder umich edu
 / _  / _ `/ |/ / / _  /   http://www.eecs.umich.edu/~dhelder
 |_,_/|_,_/|___/_/|_,_/    Jungle Monkey: http://www.junglemonkey.net





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