Description Methods and Functions Hierarchy Interfaces Detailed Description Structures Convenient Construction Signals Properties Style Properties Author(s) References
A widget used to choose from a list of valid choices
gtkOptionMenuNew(show = TRUE)
gtkOptionMenuGetMenu(object)
gtkOptionMenuSetMenu(object, menu)
gtkOptionMenuRemoveMenu(object)
gtkOptionMenuSetHistory(object, index)
gtkOptionMenuGetHistory(object)
gtkOptionMenu(show = TRUE)
1 2 3 4 5 6 7 8 | GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkButton
+----GtkOptionMenu
|
GtkOptionMenu implements
AtkImplementorIface, GtkBuildable
and GtkActivatable
.
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
.
GtkOptionMenu
WARNING: GtkOptionMenu
has been deprecated since version 2.4 and should not be used in newly-written code. Use GtkComboBox
instead.
The GtkOptionMenu
struct contains private data only, and
should be accessed using the functions below.
gtkOptionMenu
is the equivalent of gtkOptionMenuNew
.
changed(optionmenu, user.data)
undocumented
optionmenu
the object which received the signal.
user.data
user data set when the signal handler was connected.
menu
[GtkMenu
: * : Read / Write]The menu of options.
indicator-size
[GtkRequisition
: * : Read]Size of dropdown indicator.
indicator-spacing
[GtkBorder
: * : Read]Spacing around indicator.
Derived by RGtkGen from GTK+ documentation
https://developer.gnome.org/gtk2/stable/GtkOptionMenu.html
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.