Re: [gtk-list] Option widget index



K. M. Hawarden-Ogata wrote:
> 
> For an option menu widget, how do you read off the selected option, without
> using a callback?

>From browsing the reference documentation, GtkMenu provides the
following function:

GtkWidget*  gtk_menu_get_active             (GtkMenu *menu);

So to find which option menu item was just selected, call that function
using whichever GtkMenu you passed when setting the menu of your
GtkOptionMenu.

This returns the relevant GtkMenuItem that was selected.

hth,

--
Lee.
http://atlas.cs.york.ac.uk/~lrpm100/



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