Re: Popup menus and Glade
- From: David Helder <dhelder umich edu>
- To: Lars Bensmann <lars bensmann epost de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Popup menus and Glade
- Date: Fri, 6 Oct 2000 10:32:58 -0400 (EDT)
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]