Sets our main struct and passes it to the parent class.
Creates a new ComboBoxText, which is a ComboBox just displaying strings.
Appends @text to the list of strings stored in @combo_box.
Appends @text to the list of strings stored in @combo_box.
Returns the currently active string in @combo_box.
Get the main Gtk struct
the main Gtk struct as a void*
Inserts @text at @position in the list of strings stored in @combo_box.
Inserts @text at @position in the list of strings stored in @combo_box.
Prepends @text to the list of strings stored in @combo_box.
Prepends @text to the list of strings stored in @combo_box.
Removes the string at @position from @combo_box.
Removes all the text entries from the combo box.
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Returns the index of the currently active item.
Returns the ID of the active row of @combo_box.
Sets @iter to point to the currently active item.
Returns whether the combo box sets the dropdown button sensitive or not when there are no items in the model.
Gets the child widget of @combo_box.
Returns the column which @combo_box is using to get the strings from to display in the internal entry.
Returns whether the combo box has an entry.
Returns the column which @combo_box is using to get string IDs for values from.
Returns the GtkTreeModel of @combo_box.
Gets whether the popup uses a fixed width.
Returns the current row separator function.
Hides the menu or dropdown list of @combo_box.
Pops up the menu or dropdown list of @combo_box.
Pops up the menu of @combo_box.
Sets the active item of @combo_box to be the item at @index.
Changes the active row of @combo_box to the one that has an ID equal to @active_id.
Sets the current active item to be the one referenced by @iter.
Sets whether the dropdown button of the combo box should update its sensitivity depending on the model contents.
Sets the child widget of @combo_box.
Sets the model column which @combo_box should use to get strings from to be @text_column.
Sets the model column which @combo_box should use to get string IDs for values from.
Sets the model used by @combo_box to be @model.
Specifies whether the popup’s width should be a fixed width.
Sets the row separator function, which is used to determine whether a row should be drawn as a separator.
Emitted when the active item is changed.
Emitted to allow changing how the text in a combo box's entry is displayed.
Emitted to move the active selection.
Emitted to popdown the combo box list.
Emitted to popup the combo box list.
A GtkComboBoxText is a simple variant of GtkComboBox for text-only use cases.
GtkComboBoxText hides the model-view complexity of GtkComboBox.
To create a GtkComboBoxText, use [ctor@Gtk.ComboBoxText.new] or [ctor@Gtk.ComboBoxText.new_with_entry].
You can add items to a GtkComboBoxText with [method@Gtk.ComboBoxText.append_text], [method@Gtk.ComboBoxText.insert_text] or [method@Gtk.ComboBoxText.prepend_text] and remove options with [method@Gtk.ComboBoxText.remove].
If the GtkComboBoxText contains an entry (via the [property@Gtk.ComboBox:has-entry] property), its contents can be retrieved using [method@Gtk.ComboBoxText.get_active_text].
You should not call [method@Gtk.ComboBox.set_model] or attempt to pack more cells into this combo box via its [interface@Gtk.CellLayout] interface.
GtkComboBoxText as GtkBuildable
The GtkComboBoxText implementation of the GtkBuildable interface supports adding items directly using the <items> element and specifying <item> elements for each item. Each <item> element can specify the “id” corresponding to the appended text and also supports the regular translation attributes “translatable”, “context” and “comments”.
Here is a UI definition fragment specifying GtkComboBoxText items:
CSS nodes
GtkComboBoxText has a single CSS node with name combobox. It adds the style class .combo to the main CSS nodes of its entry and button children, and the .linked class to the node of its internal box.