A widget used to choose from a list of items.
The GtkComboBox is a replacement for the
GtkOptionMenu and GtkCombo
widgets, providing a solution that allows the user to choose from a list of
A GtkComboBox implements the GtkCellLayout interface,
that provides a number of useful methods for managing the contents, adopting
a model-view pattern. The
constructor can be associated with
an optional GtkTreeModel, which can otherwise be
added later with the set_model()
Alternatively, the new_text
function creates a simple GtkComboBox and associated
GtkListStore model. A
GtkCellRendererText is also created and packed in the
new combo box. In this simple combo box each list item is a text string that
can be selected. The convenience methods
remove_text() can be used
to manage the contents of the GtkComboBox.
Creates a new GtkComboBox
Constructs a new text combo box
The "changed" signal is emitted when a new item in the combo box is selected.