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 ?

bind the menu items with 

gtk_signal_connect( GTK_OBJECT( menu_item[i] ),
	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
>Franck Martin
>Network and Database Development Officer
>SOPAC South Pacific Applied Geoscience Commission
>E-mail: <> 
>Web site: <> 
>To unsubscribe: mail with "unsubscribe"
>as the Subject.

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