Re: Option menu



Am Thu, 16 Mar 2000 schrieb Franck Martin:
>Sorry for such Trivia, I would lie to retrieve the selected value of an
>option menu widget in C. I do not wish to use set_full_data.
>
>Can someone points me to the code ?

hi
bind the menu items with 

gtk_signal_connect( GTK_OBJECT( menu_item[i] ),
	"activate",
	GTK_SIGNAL_FUNC(menu_activate_cb ),
	(gpointer) i );

to the

static void
menu_activate_cb( GtkWidget *widget, gpointer data ){
    activated = (int) data;
}

that's it.
hope that helps
detlef
>
>Cheers
>Franck Martin
>Network and Database Development Officer
>SOPAC South Pacific Applied Geoscience Commission
>Fiji
>E-mail: franck@sopac.org.fj <mailto:franck@sopac.org.fj> 
>Web site: www.sopac.org.fj <http://www.sopac.org.fj> 
>
>
>-- 
>To unsubscribe: mail gnome-devel-list-request@gnome.org with "unsubscribe"
>as the Subject.
--
detlef.reichl@arcormail.de
www.Teatime.sourceforge.net
www.Mounter.sourceforge.net



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