Next: , Previous: GtkTreeViewColumn, Up: Top


35 GtkTreeView

A widget for displaying both trees and lists

35.1 Overview

Widget that displays any object that implements the GtkTreeModel interface.

Please refer to the tree widget conceptual overview for an overview of all the objects and data types related to the tree widget and how they work together.

35.2 Usage

— Class: <gtk-tree-view>

Derives from <gtk-container>.

This class defines the following slots:

model
The model for the tree view
hadjustment
Horizontal Adjustment for the widget
vadjustment
Vertical Adjustment for the widget
headers-visible
Show the column header buttons
headers-clickable
Column headers respond to click events
expander-column
Set the column for the expander column
reorderable
View is reorderable
rules-hint
Set a hint to the theme engine to draw rows in alternating colors
enable-search
View allows user to search through columns interactively
search-column
Model column to search through when searching through code
fixed-height-mode
Speeds up GtkTreeView by assuming that all rows have the same height
hover-selection
Whether the selection should follow the pointer
hover-expand
Whether rows should be expanded/collapsed when the pointer moves over them
show-expanders
View has expanders
level-indentation
Extra indentation for each level
rubber-banding
Whether to enable selection of multiple items by dragging the mouse pointer
enable-grid-lines
Whether grid lines should be drawn in the tree view
enable-tree-lines
Whether tree lines should be drawn in the tree view
tooltip-column
The column in the model containing the tooltip texts for the rows
— Signal on <gtk-tree-view>: move-cursor (arg0 <gtk-movement-step>) (arg1 <gint>) ⇒ <gboolean>
— Signal on <gtk-tree-view>: set-scroll-adjustments (arg0 <gtk-adjustment>) (arg1 <gtk-adjustment>)
— Signal on <gtk-tree-view>: select-all ⇒ <gboolean>
— Signal on <gtk-tree-view>: unselect-all ⇒ <gboolean>
— Signal on <gtk-tree-view>: row-activated (arg0 <gtk-tree-path>) (arg1 <gtk-tree-view-column>)

The "row-activated" signal is emitted when the method gtk-tree-view-row-activated is called or the user double clicks a treeview row. It is also emitted when a non-editable row is selected and one of the keys: Space, Shift+Space, Return or Enter is pressed.

For selection handling refer to the tree widget conceptual overview as well as <gtk-tree-selection>.

— Signal on <gtk-tree-view>: test-expand-row (arg0 <gtk-tree-iter>) (arg1 <gtk-tree-path>) ⇒ <gboolean>

The given row is about to be expanded (show its children nodes). Use this signal if you need to control the expandability of individual rows.

— Signal on <gtk-tree-view>: test-collapse-row (arg0 <gtk-tree-iter>) (arg1 <gtk-tree-path>) ⇒ <gboolean>

The given row is about to be collapsed (hide its children nodes). Use this signal if you need to control the collapsibility of individual rows.

— Signal on <gtk-tree-view>: row-expanded (arg0 <gtk-tree-iter>) (arg1 <gtk-tree-path>)

The given row has been expanded (child nodes are shown).

— Signal on <gtk-tree-view>: row-collapsed (arg0 <gtk-tree-iter>) (arg1 <gtk-tree-path>)

The given row has been collapsed (child nodes are hidden).

— Signal on <gtk-tree-view>: columns-changed

The number of columns of the treeview has changed.

— Signal on <gtk-tree-view>: cursor-changed

The position of the cursor (focused cell) has changed.

— Signal on <gtk-tree-view>: select-cursor-row (arg0 <gboolean>) ⇒ <gboolean>
— Signal on <gtk-tree-view>: toggle-cursor-row ⇒ <gboolean>
— Signal on <gtk-tree-view>: expand-collapse-cursor-row (arg0 <gboolean>) (arg1 <gboolean>) (arg2 <gboolean>) ⇒ <gboolean>
— Signal on <gtk-tree-view>: select-cursor-parent ⇒ <gboolean>
— Signal on <gtk-tree-view>: start-interactive-search ⇒ <gboolean>
— Function: gtk-tree-view-new ⇒  (ret <gtk-widget>)

Creates a new <gtk-tree-view> widget.

ret
A newly created <gtk-tree-view> widget.
— Function: gtk-tree-view-new-with-model (model <gtk-tree-model>) ⇒  (ret <gtk-widget>)

Creates a new <gtk-tree-view> widget with the model initialized to model.

model
the model.
ret
A newly created <gtk-tree-view> widget.
— Function: gtk-tree-view-get-model (self <gtk-tree-view>) ⇒  (ret <gtk-tree-model>)
— Method: get-model

Returns the model the <gtk-tree-view> is based on. Returns ‘#f’ if the model is unset.

tree-view
a <gtk-tree-view>
ret
A <gtk-tree-model>, or ‘#f’ if none is currently being used.
— Function: gtk-tree-view-set-model (self <gtk-tree-view>) (model <gtk-tree-model>)
— Method: set-model

Sets the model for a <gtk-tree-view>. If the tree-view already has a model set, it will remove it before setting the new model. If model is ‘#f’, then it will unset the old model.

tree-view
A <gtk-tree-node>.
model
The model.
— Function: gtk-tree-view-get-selection (self <gtk-tree-view>) ⇒  (ret <gtk-tree-selection>)
— Method: get-selection

Gets the <gtk-tree-selection> associated with tree-view.

tree-view
A <gtk-tree-view>.
ret
A <gtk-tree-selection> object.
— Function: gtk-tree-view-get-hadjustment (self <gtk-tree-view>) ⇒  (ret <gtk-adjustment>)
— Method: get-hadjustment

Gets the <gtk-adjustment> currently being used for the horizontal aspect.

tree-view
A <gtk-tree-view>
ret
A <gtk-adjustment> object, or ‘#f’ if none is currently being used.
— Function: gtk-tree-view-set-hadjustment (self <gtk-tree-view>) (adjustment <gtk-adjustment>)
— Method: set-hadjustment

Sets the <gtk-adjustment> for the current horizontal aspect.

tree-view
A <gtk-tree-view>
adjustment
The <gtk-adjustment> to set, or ‘#f
— Function: gtk-tree-view-get-vadjustment (self <gtk-tree-view>) ⇒  (ret <gtk-adjustment>)
— Method: get-vadjustment

Gets the <gtk-adjustment> currently being used for the vertical aspect.

tree-view
A <gtk-tree-view>
ret
A <gtk-adjustment> object, or ‘#f’ if none is currently being used.
— Function: gtk-tree-view-set-vadjustment (self <gtk-tree-view>) (adjustment <gtk-adjustment>)
— Method: set-vadjustment

Sets the <gtk-adjustment> for the current vertical aspect.

tree-view
A <gtk-tree-view>
adjustment
The <gtk-adjustment> to set, or ‘#f
— Function: gtk-tree-view-get-headers-visible (self <gtk-tree-view>) ⇒  (ret bool)
— Method: get-headers-visible

Returns ‘#t’ if the headers on the tree-view are visible.

tree-view
A <gtk-tree-view>.
ret
Whether the headers are visible or not.
— Function: gtk-tree-view-set-headers-visible (self <gtk-tree-view>) (headers_visible bool)
— Method: set-headers-visible

Sets the visibility state of the headers.

tree-view
A <gtk-tree-view>.
headers-visible
#t’ if the headers are visible
— Function: gtk-tree-view-columns-autosize (self <gtk-tree-view>)
— Method: columns-autosize

Resizes all columns to their optimal width. Only works after the treeview has been realized.

tree-view
A <gtk-tree-view>.
— Function: gtk-tree-view-get-headers-clickable (self <gtk-tree-view>) ⇒  (ret bool)
— Method: get-headers-clickable

Returns whether all header columns are clickable.

tree-view
A <gtk-tree-view>.
ret
#t’ if all header columns are clickable, otherwise ‘#f

Since 2.10

— Function: gtk-tree-view-set-headers-clickable (self <gtk-tree-view>) (setting bool)
— Method: set-headers-clickable

Allow the column title buttons to be clicked.

tree-view
A <gtk-tree-view>.
setting
#t’ if the columns are clickable.
— Function: gtk-tree-view-set-rules-hint (self <gtk-tree-view>) (setting bool)
— Method: set-rules-hint

This function tells GTK+ that the user interface for your application requires users to read across tree rows and associate cells with one another. By default, GTK+ will then render the tree with alternating row colors. Do not use it just because you prefer the appearance of the ruled tree; that's a question for the theme. Some themes will draw tree rows in alternating colors even when rules are turned off, and users who prefer that appearance all the time can choose those themes. You should call this function only as a semantic hint to the theme engine that your tree makes alternating colors useful from a functional standpoint (since it has lots of columns, generally).

tree-view
a <gtk-tree-view>
setting
#t’ if the tree requires reading across rows
— Function: gtk-tree-view-get-rules-hint (self <gtk-tree-view>) ⇒  (ret bool)
— Method: get-rules-hint

Gets the setting set by gtk-tree-view-set-rules-hint.

tree-view
a <gtk-tree-view>
ret
#t’ if rules are useful for the user of this tree
— Function: gtk-tree-view-append-column (self <gtk-tree-view>) (column <gtk-tree-view-column>) ⇒  (ret int)
— Method: append-column

Appends column to the list of columns. If tree-view has "fixed_height" mode enabled, then column must have its "sizing" property set to be GTK_TREE_VIEW_COLUMN_FIXED.

tree-view
A <gtk-tree-view>.
column
The <gtk-tree-view-column> to add.
ret
The number of columns in tree-view after appending.
— Function: gtk-tree-view-remove-column (self <gtk-tree-view>) (column <gtk-tree-view-column>) ⇒  (ret int)
— Method: remove-column

Removes column from tree-view.

tree-view
A <gtk-tree-view>.
column
The <gtk-tree-view-column> to remove.
ret
The number of columns in tree-view after removing.
— Function: gtk-tree-view-insert-column (self <gtk-tree-view>) (column <gtk-tree-view-column>) (position int) ⇒  (ret int)
— Method: insert-column

This inserts the column into the tree-view at position. If position is -1, then the column is inserted at the end. If tree-view has "fixed_height" mode enabled, then column must have its "sizing" property set to be GTK_TREE_VIEW_COLUMN_FIXED.

tree-view
A <gtk-tree-view>.
column
The <gtk-tree-view-column> to be inserted.
position
The position to insert column in.
ret
The number of columns in tree-view after insertion.
— Function: gtk-tree-view-get-column (self <gtk-tree-view>) (int) ⇒  (ret <gtk-tree-view-column>)
— Method: get-column

Gets the <gtk-tree-view-column> at the given position in the <tree-view>.

tree-view
A <gtk-tree-view>.
n
The position of the column, counting from 0.
ret
The <gtk-tree-view-column>, or ‘#f’ if the position is outside the range of columns.
— Function: gtk-tree-view-get-columns (self <gtk-tree-view>) ⇒  (ret glist-of)
— Method: get-columns

Returns a <g-list> of all the <gtk-tree-view-column> s currently in tree-view. The returned list must be freed with g-list-free.

tree-view
A <gtk-tree-view>
ret
A list of <gtk-tree-view-column> s
— Function: gtk-tree-view-move-column-after (self <gtk-tree-view>) (column <gtk-tree-view-column>) (base_column <gtk-tree-view-column>)
— Method: move-column-after

Moves column to be after to base-column. If base-column is ‘#f’, then column is placed in the first position.

tree-view
A <gtk-tree-view>
column
The <gtk-tree-view-column> to be moved.
base-column
The <gtk-tree-view-column> to be moved relative to, or ‘#f’.
— Function: gtk-tree-view-set-expander-column (self <gtk-tree-view>) (column <gtk-tree-view-column>)
— Method: set-expander-column

Sets the column to draw the expander arrow at. It must be in tree-view. If column is ‘#f’, then the expander arrow is always at the first visible column.

If you do not want expander arrow to appear in your tree, set the expander column to a hidden column.

tree-view
A <gtk-tree-view>
column
#f’, or the column to draw the expander arrow at.
— Function: gtk-tree-view-get-expander-column (self <gtk-tree-view>) ⇒  (ret <gtk-tree-view-column>)
— Method: get-expander-column

Returns the column that is the current expander column. This column has the expander arrow drawn next to it.

tree-view
A <gtk-tree-view>
ret
The expander column.
— Function: gtk-tree-view-scroll-to-point (self <gtk-tree-view>) (tree_x int) (tree_y int)
— Method: scroll-to-point

Scrolls the tree view such that the top-left corner of the visible area is tree-x, tree-y, where tree-x and tree-y are specified in tree window coordinates. The tree-view must be realized before this function is called. If it isn't, you probably want to be using gtk-tree-view-scroll-to-cell.

If either tree-x or tree-y are -1, then that direction isn't scrolled.

tree-view
a <gtk-tree-view>
tree-x
X coordinate of new top-left pixel of visible area, or -1
tree-y
Y coordinate of new top-left pixel of visible area, or -1
— Function: gtk-tree-view-scroll-to-cell (self <gtk-tree-view>) (path <gtk-tree-path>) (column <gtk-tree-view-column>) (use_align bool) (row_align float) (col_align float)
— Method: scroll-to-cell

Moves the alignments of tree-view to the position specified by column and path. If column is ‘#f’, then no horizontal scrolling occurs. Likewise, if path is ‘#f’ no vertical scrolling occurs. At a minimum, one of column or path need to be non-‘#f’. row-align determines where the row is placed, and col-align determines where column is placed. Both are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.

If use-align is ‘#f’, then the alignment arguments are ignored, and the tree does the minimum amount of work to scroll the cell onto the screen. This means that the cell will be scrolled to the edge closest to its current position. If the cell is currently visible on the screen, nothing is done.

This function only works if the model is set, and path is a valid row on the model. If the model changes before the tree-view is realized, the centered path will be modified to reflect this change.

tree-view
A <gtk-tree-view>.
path
The path of the row to move to, or ‘#f’.
column
The <gtk-tree-view-column> to move horizontally to, or ‘#f’.
use-align
whether to use alignment arguments, or ‘#f’.
row-align
The vertical alignment of the row specified by path.
col-align
The horizontal alignment of the column specified by column.
— Function: gtk-tree-view-set-cursor (self <gtk-tree-view>) (path <gtk-tree-path>) (focus_column <gtk-tree-view-column>) (start_editing bool)
— Method: set-cursor

Sets the current keyboard focus to be at path, and selects it. This is useful when you want to focus the user's attention on a particular row. If focus-column is not ‘#f’, then focus is given to the column specified by it. Additionally, if focus-column is specified, and start-editing is ‘#t’, then editing should be started in the specified cell. This function is often followed by gtk-widget-grab-focus (tree-view) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.

tree-view
A <gtk-tree-view>
path
A <gtk-tree-path>
focus-column
A <gtk-tree-view-column>, or ‘#f
start-editing
#t’ if the specified cell should start being edited.
— Function: gtk-tree-view-set-cursor-on-cell (self <gtk-tree-view>) (path <gtk-tree-path>) (focus_column <gtk-tree-view-column>) (focus_cell <gtk-cell-renderer>) (start_editing bool)
— Method: set-cursor-on-cell

Sets the current keyboard focus to be at path, and selects it. This is useful when you want to focus the user's attention on a particular row. If focus-column is not ‘#f’, then focus is given to the column specified by it. If focus-column and focus-cell are not ‘#f’, and focus-column contains 2 or more editable or activatable cells, then focus is given to the cell specified by focus-cell. Additionally, if focus-column is specified, and start-editing is ‘#t’, then editing should be started in the specified cell. This function is often followed by gtk-widget-grab-focus (tree-view) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.

tree-view
A <gtk-tree-view>
path
A <gtk-tree-path>
focus-column
A <gtk-tree-view-column>, or ‘#f
focus-cell
A <gtk-cell-renderer>, or ‘#f
start-editing
#t’ if the specified cell should start being edited.

Since 2.2

— Function: gtk-tree-view-row-activated (self <gtk-tree-view>) (path <gtk-tree-path>) (column <gtk-tree-view-column>)
— Method: row-activated

Activates the cell determined by path and column.

tree-view
A <gtk-tree-view>
path
The <gtk-tree-path> to be activated.
column
The <gtk-tree-view-column> to be activated.
— Function: gtk-tree-view-expand-all (self <gtk-tree-view>)
— Method: expand-all

Recursively expands all nodes in the tree-view.

tree-view
A <gtk-tree-view>.
— Function: gtk-tree-view-collapse-all (self <gtk-tree-view>)
— Method: collapse-all

Recursively collapses all visible, expanded nodes in tree-view.

tree-view
A <gtk-tree-view>.
— Function: gtk-tree-view-expand-to-path (self <gtk-tree-view>) (path <gtk-tree-path>)
— Method: expand-to-path

Expands the row at path. This will also expand all parent rows of path as necessary.

tree-view
A <gtk-tree-view>.
path
path to a row.

Since 2.2

— Function: gtk-tree-view-expand-row (self <gtk-tree-view>) (path <gtk-tree-path>) (open_all bool) ⇒  (ret bool)
— Method: expand-row

Opens the row so its children are visible.

tree-view
a <gtk-tree-view>
path
path to a row
open-all
whether to recursively expand, or just expand immediate children
ret
#t’ if the row existed and had children
— Function: gtk-tree-view-collapse-row (self <gtk-tree-view>) (path <gtk-tree-path>) ⇒  (ret bool)
— Method: collapse-row

Collapses a row (hides its child rows, if they exist).

tree-view
a <gtk-tree-view>
path
path to a row in the tree-view
ret
#t’ if the row was collapsed.
— Function: gtk-tree-view-row-expanded (self <gtk-tree-view>) (path <gtk-tree-path>) ⇒  (ret bool)
— Method: row-expanded

Returns ‘#t’ if the node pointed to by path is expanded in tree-view.

tree-view
A <gtk-tree-view>.
path
A <gtk-tree-path> to test expansion state.
ret
#t’ if <path> is expanded.
— Function: gtk-tree-view-set-reorderable (self <gtk-tree-view>) (reorderable bool)
— Method: set-reorderable

This function is a convenience function to allow you to reorder models that support the <gtk-drag-source-iface> and the <gtk-drag-dest-iface>. Both <gtk-tree-store> and <gtk-list-store> support these. If reorderable is ‘#t’, then the user can reorder the model by dragging and dropping rows. The developer can listen to these changes by connecting to the model's row_inserted and row_deleted signals.

This function does not give you any degree of control over the order – any reordering is allowed. If more control is needed, you should probably handle drag and drop manually.

tree-view
A <gtk-tree-view>.
reorderable
#t’, if the tree can be reordered.
— Function: gtk-tree-view-get-reorderable (self <gtk-tree-view>) ⇒  (ret bool)
— Method: get-reorderable

Retrieves whether the user can reorder the tree via drag-and-drop. See gtk-tree-view-set-reorderable.

tree-view
a <gtk-tree-view>
ret
#t’ if the tree can be reordered.
— Function: gtk-tree-view-get-bin-window (self <gtk-tree-view>) ⇒  (ret <gdk-window>)
— Method: get-bin-window

Returns the window that tree-view renders to. This is used primarily to compare to ‘event->window’ to confirm that the event on tree-view is on the right window.

tree-view
A <gtk-tree-view>
ret
A <gdk-window>, or ‘#f’ when tree-view hasn't been realized yet
— Function: gtk-tree-view-widget-to-tree-coords (self <gtk-tree-view>) (wx int) (wy int) ⇒  (tx int) (ty int)
— Method: widget-to-tree-coords

Converts widget coordinates to coordinates for the tree window (the full scrollable area of the tree).

tree-view
a <gtk-tree-view>
wx
widget X coordinate
wy
widget Y coordinate
tx
return location for tree X coordinate
ty
return location for tree Y coordinate
— Function: gtk-tree-view-tree-to-widget-coords (self <gtk-tree-view>) (tx int) (ty int) ⇒  (wx int) (wy int)
— Method: tree-to-widget-coords

Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates.

tree-view
a <gtk-tree-view>
tx
tree X coordinate
ty
tree Y coordinate
wx
return location for widget X coordinate
wy
return location for widget Y coordinate
— Function: gtk-tree-view-unset-rows-drag-dest (self <gtk-tree-view>)
— Method: unset-rows-drag-dest

Undoes the effect of gtk-tree-view-enable-model-drag-dest.

tree-view
a <gtk-tree-view>
— Function: gtk-tree-view-set-drag-dest-row (self <gtk-tree-view>) (path <gtk-tree-path>) (pos <gtk-tree-view-drop-position>)
— Method: set-drag-dest-row

Sets the row that is highlighted for feedback.

tree-view
a <gtk-tree-view>
path
The path of the row to highlight, or ‘#f’.
pos
Specifies whether to drop before, after or into the row
— Function: gtk-tree-view-create-row-drag-icon (self <gtk-tree-view>) (path <gtk-tree-path>) ⇒  (ret <gdk-pixmap>)
— Method: create-row-drag-icon

Creates a <gdk-pixmap> representation of the row at path. This image is used for a drag icon.

tree-view
a <gtk-tree-view>
path
a <gtk-tree-path> in tree-view
ret
a newly-allocated pixmap of the drag icon.
— Function: gtk-tree-view-set-enable-search (self <gtk-tree-view>) (enable_search bool)
— Method: set-enable-search

If enable-search is set, then the user can type in text to search through the tree interactively (this is sometimes called "typeahead find").

Note that even if this is ‘#f’, the user can still initiate a search using the "start-interactive-search" key binding.

tree-view
A <gtk-tree-view>
enable-search
#t’, if the user can search interactively
— Function: gtk-tree-view-get-enable-search (self <gtk-tree-view>) ⇒  (ret bool)
— Method: get-enable-search

Returns whether or not the tree allows to start interactive searching by typing in text.

tree-view
A <gtk-tree-view>
ret
whether or not to let the user search interactively
— Function: gtk-tree-view-get-search-column (self <gtk-tree-view>) ⇒  (ret int)
— Method: get-search-column

Gets the column searched on by the interactive search code.

tree-view
A <gtk-tree-view>
ret
the column the interactive search code searches in.
— Function: gtk-tree-view-set-search-column (self <gtk-tree-view>) (column int)
— Method: set-search-column

Sets column as the column where the interactive search code should search in.

If the sort column is set, users can use the "start-interactive-search" key binding to bring up search popup. The enable-search property controls whether simply typing text will also start an interactive search.

Note that column refers to a column of the model.

tree-view
A <gtk-tree-view>
column
the column of the model to search in, or -1 to disable searching
— Function: gtk-tree-view-get-search-entry (self <gtk-tree-view>) ⇒  (ret <gtk-entry>)
— Method: get-search-entry

Returns the GtkEntry which is currently in use as interactive search entry for tree-view. In case the built-in entry is being used, ‘#f’ will be returned.

tree-view
A <gtk-tree-view>
ret
the entry currently in use as search entry.

Since 2.10

— Function: gtk-tree-view-set-search-entry (self <gtk-tree-view>) (entry <gtk-entry>)
— Method: set-search-entry

Sets the entry which the interactive search code will use for this tree-view. This is useful when you want to provide a search entry in our interface at all time at a fixed position. Passing ‘#f’ for entry will make the interactive search code use the built-in popup entry again.

tree-view
A <gtk-tree-view>
entry
the entry the interactive search code of tree-view should use or ‘#f

Since 2.10

— Function: gtk-tree-view-get-fixed-height-mode (self <gtk-tree-view>) ⇒  (ret bool)
— Method: get-fixed-height-mode

Returns whether fixed height mode is turned on for tree-view.

tree-view
a <gtk-tree-view>
ret
#t’ if tree-view is in fixed height mode

Since 2.6

— Function: gtk-tree-view-set-fixed-height-mode (self <gtk-tree-view>) (enable bool)
— Method: set-fixed-height-mode

Enables or disables the fixed height mode of tree-view. Fixed height mode speeds up <gtk-tree-view> by assuming that all rows have the same height. Only enable this option if all rows are the same height and all columns are of type ‘GTK_TREE_VIEW_COLUMN_FIXED’.

tree-view
a <gtk-tree-view>
enable
#t’ to enable fixed height mode

Since 2.6

— Function: gtk-tree-view-get-hover-selection (self <gtk-tree-view>) ⇒  (ret bool)
— Method: get-hover-selection

Returns whether hover selection mode is turned on for tree-view.

tree-view
a <gtk-tree-view>
ret
#t’ if tree-view is in hover selection mode

Since 2.6

— Function: gtk-tree-view-set-hover-selection (self <gtk-tree-view>) (hover bool)
— Method: set-hover-selection

Enables of disables the hover selection mode of tree-view. Hover selection makes the selected row follow the pointer. Currently, this works only for the selection modes ‘GTK_SELECTION_SINGLE’ and ‘GTK_SELECTION_BROWSE’.

tree-view
a <gtk-tree-view>
hover
#t’ to enable hover selection mode

Since 2.6

— Function: gtk-tree-view-get-hover-expand (self <gtk-tree-view>) ⇒  (ret bool)
— Method: get-hover-expand

Returns whether hover expansion mode is turned on for tree-view.

tree-view
a <gtk-tree-view>
ret
#t’ if tree-view is in hover expansion mode

Since 2.6

— Function: gtk-tree-view-set-hover-expand (self <gtk-tree-view>) (expand bool)
— Method: set-hover-expand

Enables of disables the hover expansion mode of tree-view. Hover expansion makes rows expand or collaps if the pointer moves over them.

tree-view
a <gtk-tree-view>
expand
#t’ to enable hover selection mode

Since 2.6

— Function: gtk-tree-view-get-rubber-banding (self <gtk-tree-view>) ⇒  (ret bool)
— Method: get-rubber-banding

Returns whether rubber banding is turned on for tree-view. If the selection mode is <gtk-selection-multiple>, rubber banding will allow the user to select multiple rows by dragging the mouse.

tree-view
a <gtk-tree-view>
ret
#t’ if rubber banding in tree-view is enabled.

Since 2.10

— Function: gtk-tree-view-set-rubber-banding (self <gtk-tree-view>) (enable bool)
— Method: set-rubber-banding

Enables or disables rubber banding in tree-view. If the selection mode is <gtk-selection-multiple>, rubber banding will allow the user to select multiple rows by dragging the mouse.

tree-view
a <gtk-tree-view>
enable
#t’ to enable rubber banding

Since 2.10

— Function: gtk-tree-view-get-enable-tree-lines (self <gtk-tree-view>) ⇒  (ret bool)
— Method: get-enable-tree-lines

Returns whether or not tree lines are drawn in tree-view.

tree-view
a <gtk-tree-view>.
ret
#t’ if tree lines are drawn in tree-view, ‘#f’ otherwise.

Since 2.10

— Function: gtk-tree-view-set-enable-tree-lines (self <gtk-tree-view>) (enabled bool)
— Method: set-enable-tree-lines

Sets whether to draw lines interconnecting the expanders in tree-view. This does not have any visible effects for lists.

tree-view
a <gtk-tree-view>
enabled
#t’ to enable tree line drawing, ‘#f’ otherwise.

Since 2.10

— Function: gtk-tree-view-get-grid-lines (self <gtk-tree-view>) ⇒  (ret <gtk-tree-view-grid-lines>)
— Method: get-grid-lines

Returns which grid lines are enabled in tree-view.

tree-view
a <gtk-tree-view>
ret
a <gtk-tree-view-grid-lines> value indicating which grid lines are enabled.

Since 2.10

— Function: gtk-tree-view-set-grid-lines (self <gtk-tree-view>) (grid_lines <gtk-tree-view-grid-lines>)
— Method: set-grid-lines

Sets which grid lines to draw in tree-view.

tree-view
a <gtk-tree-view>
grid-lines
a <gtk-tree-view-grid-lines> value indicating which grid lines to enable.

Since 2.10