GtkOptionMenu

GtkOptionMenu — A widget used to choose from a list of valid choices

Includes

#include <gtk/gtk.h>

Description

A GtkOptionMenu is a widget that allows the user to choose from a list of valid choices. The GtkOptionMenu displays the selected choice. When activated the GtkOptionMenu displays a popup GtkMenu which allows the user to make a new choice.

Using a GtkOptionMenu is simple; build a GtkMenu, by calling gtk_menu_new(), then appending menu items to it with gtk_menu_shell_append(). Set that menu on the option menu with gtk_option_menu_set_menu(). Set the selected menu item with gtk_option_menu_set_history(); connect to the "changed" signal on the option menu; in the "changed" signal, check the new selected menu item with gtk_option_menu_get_history().

As of GTK+ 2.4, GtkOptionMenu has been deprecated in favor of GtkComboBox.

Functions

Types and Values