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

Re: Access information of an optionsmenu



Hello:

You can use this function from gnome-terminal:

static gint
option_menu_get_history (GtkOptionMenu *option_menu)
{
	GtkWidget *active_widget;
	
	g_return_val_if_fail (GTK_IS_OPTION_MENU (option_menu), -1);
	
	active_widget = gtk_menu_get_active (GTK_MENU (option_menu->menu));

	if (active_widget)
		return g_list_index (GTK_MENU_SHELL (option_menu->menu)->children,
				     active_widget);
	else
		return -1;
}

Regards.

Beņat

On Tue, 2002-04-09 at 09:17, Norbert.Haefke@Freudenberg.de wrote:
> Hi 
> 
> Question about the option menu:
> 
> I need to figure out wich option was choosen from the user.
> I dont wont to use callbacks for this.
> 
> Is there any function (or way) to get information
> from the optionmenu which option is currently displayed.
> 
> Thanks for help
> 
> Norbert





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