Re: Option menu preselection




Shevek <shevek@plaice.valhalla.net> writes:

> What is the _proper_ way to preselect a menu item in an option menu? I
> have a list of gtk_radio_menu_item and I want a particular one other than
> the first one to be preselected. gtk_menuitem_select doesn't quite achieve
> what I want, as it merely depresses the radio button gimmick on more than
> one item (this should be impossible in a radio group?)

gtk_menuitem_select is used (if I'm not mistaken) when the user
drags the mouse over the item as they are navigating the menu.
Calling it at other times is likely to produce unexpected results.

What you probably want is:

void       gtk_option_menu_set_history (GtkOptionMenu *option_menu,
					guint          index);

Regards,
                                        Owen



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