Re: [gtk-list] RE: Stupid question



> Not a stupid question. You can select the item by using the
> following, where the number at the end is the item in the menu to
> select (starting from 0).
> 
> gtk_option_menu_set_history (GTK_OPTION_MENU(omenu), 1);
> 
 Well, how's that for an obvious name? :)

> The hard question is to find out which one is currently selected,
> without using callbacks to track it. Any takers?

How about: 
menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(omenu));
index = gtk_menu_get_active(GTK_MENU(menu));

Should work, or am i wrong?

/ Alex




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