Package: gtk
Class gtk:combo-box
Superclassesgtk:bin, gtk:container, gtk:widget, gtk:buildable, gtk:cell-editable, gtk:cell-layout, gobject:object, common-lisp:standard-object, common-lisp:t Documented SubclassesDirect SlotsDetails The gtk:combo-box widget allows the user to choose from a list of
valid choices. The gtk:combo-box widget displays the selected choice. When activated, the gtk:combo-box widget displays a popup which allows the user to
make a new choice. The style in which the selected value is displayed, and the
style of the popup is determined by the current theme. It may be similar to a
Windows style combo box. The gtk:combo-box widget uses the model-view pattern. The list of valid choices is specified in the form of a tree model, and the display of the choices can be adapted to the data in the model by using cell renderers, as you would in a tree view. This is possible since the gtk:combo-box class implements the gtk:cell-layout interface. The tree model holding the valid choices is not restricted to a flat list, it can be a real tree, and the popup will reflect the tree structure. To allow the user to enter values not in the model, the has-entry property allows the gtk:combo-box widget to contain a gtk:entry widget. This entry can be accessed by calling the gtk:bin-child function on the combo box. For a simple list of textual choices, the model-view API of the gtk:combo-box widget can be a bit overwhelming. In this case, the gtk:combo-box-text widget offers a simple alternative. Both the gtk:combo-box widget and the gtk:combo-box-text widget can contain an entry. CSS nodescombobox ├── box.linked │ ╰── button.combo │ ╰── box │ ├── cellview │ ╰── arrow ╰── window.popupThe normal combobox contains a box with the .linked class, a button with the .combo class and inside those buttons, there are a cellview and an arrow. combobox ├── box.linked │ ├── entry.combo │ ╰── button.combo │ ╰── box │ ╰── arrow ╰── window.popupThe gtk:combo-box widget with an entry has a single CSS node with name combobox. It contains a box with the .linked class. That box contains an entry and a button, both with the .combo class added. The button also contains another node with name arrow. Style Property Detailsappears-as-list The appears-as-list style property of type :boolean (Read) Whether dropdowns should look like lists rather than menus. Default value: false arrow-scaling The arrow-scaling style property of :float (Read) Sets the amount of space used up by the combo box arrow, proportional to the font size. Warning: The arrow-scaling style property has been deprecated since version 3.20 and should not be used in newly written code. Use the standard min-width/min-height CSS properties on the arrow node. The value of this style property is ignored. Allowed values: [0.0,2.0] Default value: 1.0 arrow-size The arrow-size style property of type :int (Read) Sets the minimum size of the arrow in the combo box. Note that the arrow size is coupled to the font size, so in case a larger font is used, the arrow will be larger than set by arrow size. Warning: The arrow-size style property has been deprecated since version 3.20 and should not be used in newly written code. Use the standard min-width/min-height CSS properties on the arrow node. The value of this style property is ignored. Allowed values: >= 0 Default value: 15 shadow-type The shadow-type style property of type gtk:shadow-type (Read) Which kind of shadow to draw around the combo box. Warning: The shadow-type style property has been deprecated since version 3.20 and should not be used in newly written code. Use CSS styling to change the appearance of the combobox frame. The value of this style property is ignored. Default value: :none Signal DetailsThe "changed" signallambda (combo) :run-last
The "format-entry-text" signallambda (combo pathstr) :run-last
(defun format-entry-text-callback (combo pathstr)
(let* ((model (gtk:combo-box-model combo))
(iter (gtk:tree-model-iter-from-string model pathstr))
(value (gtk:tree-model-value model iter col-value)))
(format nil "~a" value))) The "move-activate" signallambda (combo scroll) :action
The "popdown" signallambda (combo) :action
The "popup" signallambda (combo) :action
| Returned by
Slot Access FunctionsInherited Slot Access FunctionsSee also |
#2025-07-16