Package: gtk
Class gtk:tree-view
Superclassesgtk:container, gtk:widget, gtk:buildable, gtk:scrollable, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails The gtk:tree-view widget displays any object that implements the gtk:tree-model interface.
Please refer to the tree view conceptual overview for an overview of all
the objects and data types related to the tree view and how they work
together. ![]() Figure: GtkTreeView Several different coordinate systems are exposed in the gtk:tree-view API:
GtkTreeView as GtkBuildableExample: A UI definition fragment with the gtk:tree-view widget <object class="GtkTreeView" id="treeview"> <property name="model">liststore1</property> <child> <object class="GtkTreeViewColumn" id="test-column"> <property name="title">Test</property> <child> <object class="GtkCellRendererText" id="test-renderer"/> <attributes> <attribute name="text">1</attribute> </attributes> </child> </object> </child> <child internal-child="selection"> <object class="GtkTreeSelection" id="selection"> <signal name="changed" handler="on_treeview_selection_changed"/> </object> </child> </object> CSS nodestreeview.view ├── header │ ├── <column header> ┊ ┊ │ ╰── <column header> │ ╰── [rubberband]The gtk:tree-view implementation has a main CSS node with name treeview and .view style class. It has a subnode with name header, which is the parent for all the widgets of the column header CSS nodes. For rubberband selection, a subnode with name rubberband is used. Style Property Detailsallow-rules The allow-rules style property of type :boolean (Read) Allow drawing of alternating color rows. Default value: true even-row-color expander-size The expander-size style property of type :int (Read) Size of the expander arrow. Allowed values: >= 0 Default value: 14 grid-line-pattern The grid-line-pattern style property of type :string (Read) Dash pattern used to draw the tree view grid lines. Default value: "" grid-line-width The grid-line-width style property of type :int (Read) Width, in pixels, of the tree view grid lines. Allowed values: >= 0 Default value: 1 horizontal-separator The horizontal-separator style property of tpye :int (Read) Horizontal space between cells. Must be an even number. Allowed values: >= 0 Default value: 2 indent-expanders The indent-expanders style property of type :boolean (Read) Make the expanders indented. Default value: true odd-row-color tree-line-pattern The tree-line-pattern style property of type :string (Read) Dash pattern used to draw the tree view lines. Default value: "" tree-line-width The tree-line-width style property of type :int (Read) Width, in pixels, of the tree view lines. Allowed values: >= 0 Default value: 1 vertical-separator The vertical-separator style property of type :int (Read) Vertical space between cells. Must be an even number. Allowed values: >= 0 Default value: 2 Signal DetailsThe "columns-changed" signallambda (view) :run-last
The "cursor-changed" signallambda (view) :run-last
The "expand-collapse-cursor-row" signallambda (view arg1 arg2 arg3) :action
The "move-cursor" signallambda (view step direction) :action
The "row-activated" signallambda (view path column) :action
The "row-collapsed" signallambda (view iter path) :run-last
The "row-expanded" signallambda (view iter path) :run-last
The "select-all" signallambda (view) :action
The "select-cursor-parent" signallambda (view) :action
The "select-cursor-row" signallambda (view arg) :action
The "start-interactive-search" signallambda (view) :action
The "test-collapse-row" signallambda (view iter path) :run-last
The "test-expand-row" signallambda (view iter path) :run-last
The "toggle-cursor-row" signallambda (view) :action
The "unselect-all" signallambda (view) :action
| Returned bySlot Access FunctionsInherited Slot Access FunctionsSee also |
2025-07-15