1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A widget used to choose from a list of items
7 <!-- ##### SECTION Long_Description ##### -->
9 A #GtkComboBox is a widget that allows the user to choose from a
10 list of valid choices. The #GtkComboBox displays the selected
11 choice. When activated, the #GtkComboBox displays a popup
12 which allows the user to make a new choice. The style in which
13 the selected value is displayed, and the style of the popup is
14 determined by the current theme. It may be similar to a #GtkOptionMenu,
15 or similar to a Windows-style combo box.
19 Unlike its predecessors #GtkCombo and #GtkOptionMenu, the #GtkComboBox
20 uses the model-view pattern; the list of valid choices is specified in the
21 form of a tree model, and the display of the choices can be adapted to
22 the data in the model by using cell renderers, as you would in a tree view.
23 This is possible since #GtkComboBox implements the #GtkCellLayout interface.
24 The tree model holding the valid choices is not restricted to a flat list,
25 it can be a real tree, and the popup will reflect the tree structure.
29 In addition to the model-view API, #GtkComboBox offers a simple API which
30 is suitable for text-only combo boxes, and hides the complexity of managing
31 the data in a model. It consists of the functions gtk_combo_box_new_text(),
32 gtk_combo_box_append_text(), gtk_combo_box_insert_text(),
33 gtk_combo_box_prepend_text(), gtk_combo_box_remove_text() and
34 gtk_combo_box_get_active_text().
37 <!-- ##### SECTION See_Also ##### -->
39 #GtkComboBoxEntry, #GtkTreeModel, #GtkCellRenderer
42 <!-- ##### SECTION Stability_Level ##### -->
45 <!-- ##### STRUCT GtkComboBox ##### -->
51 <!-- ##### SIGNAL GtkComboBox::changed ##### -->
56 @combobox: the object which received the signal.
58 <!-- ##### SIGNAL GtkComboBox::move-active ##### -->
63 @combobox: the object which received the signal.
66 <!-- ##### SIGNAL GtkComboBox::popdown ##### -->
71 @combobox: the object which received the signal.
74 <!-- ##### SIGNAL GtkComboBox::popup ##### -->
79 @combobox: the object which received the signal.
81 <!-- ##### ARG GtkComboBox:active ##### -->
86 <!-- ##### ARG GtkComboBox:add-tearoffs ##### -->
91 <!-- ##### ARG GtkComboBox:button-sensitivity ##### -->
96 <!-- ##### ARG GtkComboBox:column-span-column ##### -->
101 <!-- ##### ARG GtkComboBox:focus-on-click ##### -->
106 <!-- ##### ARG GtkComboBox:has-frame ##### -->
111 <!-- ##### ARG GtkComboBox:model ##### -->
116 <!-- ##### ARG GtkComboBox:popup-shown ##### -->
121 <!-- ##### ARG GtkComboBox:row-span-column ##### -->
126 <!-- ##### ARG GtkComboBox:tearoff-title ##### -->
131 <!-- ##### ARG GtkComboBox:wrap-width ##### -->
136 <!-- ##### ARG GtkComboBox:appears-as-list ##### -->
141 <!-- ##### ARG GtkComboBox:arrow-size ##### -->
146 <!-- ##### ARG GtkComboBox:shadow-type ##### -->
151 <!-- ##### FUNCTION gtk_combo_box_new ##### -->
159 <!-- ##### FUNCTION gtk_combo_box_new_with_model ##### -->
168 <!-- ##### FUNCTION gtk_combo_box_get_wrap_width ##### -->
177 <!-- ##### FUNCTION gtk_combo_box_set_wrap_width ##### -->
186 <!-- ##### FUNCTION gtk_combo_box_get_row_span_column ##### -->
195 <!-- ##### FUNCTION gtk_combo_box_set_row_span_column ##### -->
204 <!-- ##### FUNCTION gtk_combo_box_get_column_span_column ##### -->
213 <!-- ##### FUNCTION gtk_combo_box_set_column_span_column ##### -->
222 <!-- ##### FUNCTION gtk_combo_box_get_active ##### -->
231 <!-- ##### FUNCTION gtk_combo_box_set_active ##### -->
240 <!-- ##### FUNCTION gtk_combo_box_get_active_iter ##### -->
250 <!-- ##### FUNCTION gtk_combo_box_set_active_iter ##### -->
259 <!-- ##### FUNCTION gtk_combo_box_get_model ##### -->
268 <!-- ##### FUNCTION gtk_combo_box_set_model ##### -->
277 <!-- ##### FUNCTION gtk_combo_box_new_text ##### -->
285 <!-- ##### FUNCTION gtk_combo_box_append_text ##### -->
294 <!-- ##### FUNCTION gtk_combo_box_insert_text ##### -->
304 <!-- ##### FUNCTION gtk_combo_box_prepend_text ##### -->
313 <!-- ##### FUNCTION gtk_combo_box_remove_text ##### -->
322 <!-- ##### FUNCTION gtk_combo_box_get_active_text ##### -->
331 <!-- ##### FUNCTION gtk_combo_box_popup ##### -->
339 <!-- ##### FUNCTION gtk_combo_box_popdown ##### -->
347 <!-- ##### FUNCTION gtk_combo_box_get_popup_accessible ##### -->
356 <!-- ##### FUNCTION gtk_combo_box_get_row_separator_func ##### -->
365 <!-- ##### FUNCTION gtk_combo_box_set_row_separator_func ##### -->
376 <!-- ##### FUNCTION gtk_combo_box_set_add_tearoffs ##### -->
385 <!-- ##### FUNCTION gtk_combo_box_get_add_tearoffs ##### -->
394 <!-- ##### FUNCTION gtk_combo_box_set_title ##### -->
403 <!-- ##### FUNCTION gtk_combo_box_get_title ##### -->
412 <!-- ##### FUNCTION gtk_combo_box_set_focus_on_click ##### -->
421 <!-- ##### FUNCTION gtk_combo_box_get_focus_on_click ##### -->
430 <!-- ##### FUNCTION gtk_combo_box_set_button_sensitivity ##### -->
439 <!-- ##### FUNCTION gtk_combo_box_get_button_sensitivity ##### -->