Learn R Programming

RGtk2 (version 2.8.8)

GtkOptionMenu: GtkOptionMenu

Description

A widget used to choose from a list of valid choices

Arguments

Methods and Functions

gtkOptionMenuNew(show = TRUE) gtkOptionMenuGetMenu(object) gtkOptionMenuSetMenu(object, menu) gtkOptionMenuRemoveMenu(object) gtkOptionMenuSetHistory(object, index) gtkOptionMenuGetHistory(object) gtkOptionMenu(show = TRUE)

Hierarchy

\link{GObject} +----\link{GtkObject} +----\link{GtkWidget} +----\link{GtkContainer} +----\link{GtkBin} +----\link{GtkButton} +----GtkOptionMenu

Interfaces

GtkOptionMenu implements AtkImplementorIface.

Detailed 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 gtkMenuNew, then appending menu items to it with gtkMenuShellAppend. Set that menu on the option menu with gtkOptionMenuSetMenu. Set the selected menu item with gtkOptionMenuSetHistory; connect to the "changed" signal on the option menu; in the "changed" signal, check the new selected menu item with gtkOptionMenuGetHistory. As of GTK+ 2.4, GtkOptionMenu has been deprecated in favor of GtkComboBox.

Convenient Construction

gtkOptionMenu is the equivalent of gtkOptionMenuNew.

References

http://developer.gnome.org/doc/API/2.0/gtk/GtkOptionMenu.html