Package: gtk
Class gtk:combo-box
Superclassesgtk:widget, gobject:initially-unowned, gtk:accessible, gtk:buildable, gtk:constraint-target, gtk:cell-layout, gtk:cell-editable, 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:combo-box-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 nodesCSS nodes combobox ├── box.linked │ ╰── button.combo │ ╰── box │ ├── cellview │ ╰── arrow ╰── window.popupA 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.popupA 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. AccessibilityWarningSignal DetailsThe "activate" signallambda (combo) :action
The "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-active" signallambda (combo scroll) :action
The "popdown" signallambda (combo) :action
The "popup" signallambda (combo) :action
| Returned by
Slot Access FunctionsInherited Slot Access FunctionsSee also |
2024-4-7