Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

Gtk::TreeView

class Gtk::TreeView

Widget that displays any object that implements the Gtk::TreeModel interface.

Class Methods

Gtk::TreeView.new(model = nil)
Creates a new Gtk::TreeView widget with the model initialized to model or nil.
  • model: the model.
  • Returns: A newly created Gtk::TreeView widget.

Instance Methods

model
Returns the model the the Gtk::TreeView is based on. Returns nil if the model is unset.
model=(model)
Sets the model for a Gtk::TreeView. If the Gtk::TreeView already has a model set, it will remove it before setting the new model. If model is nil, then it will unset the old model.
  • model: The model
  • Returns: model
set_model(model)
Same as Gtk::TreeView#model=.
  • model: The model
  • Returns: self
selection
Gets the Gtk::TreeSelection associated with the TreeView.
hadjustment
Gets the Gtk::Adjustment currently being used for the horizontal aspect.
  • Returns: A Gtk::Adjustment object, or nil if none is currently being used.
hadjustment=(adjustment)
Sets the Gtk::Adjustment for the current horizontal aspect.
set_hadjustment(adjustment)
Same as Gtk::TreeView#hadjustment=.
  • Returns: self
vadjustment
Gets the Gtk::Adjustment currently being used for the vertical aspect.
  • Returns: A Gtk::Adjustment object, or nil if none is currently being used.
vadjustment=(adjustment)
Sets the Gtk::Adjustment for the current vertical aspect.
set_vadjustment(adjustment)
Same as Gtk::TreeView#vadjustment=.
  • Returns: self
headers_visible?
Returns true if the headers on the Gtk::TreeView are visible.
  • Returns: Whether the headers are visible or not.
headers_visible=(headers_visible)
Sets the the visibility state of the headers.
  • headers_visible: true if the headers are visible
  • Returns: headers_visible
set_headers_visible(headers_visible)
Same as Gtk::TreeView#headers_visible=.
  • Returns: headers_visible
columns_autosize
Resizes all columns to their optimal width. Only works after the Gtk::TreeView has been realized.
  • Returns: self
headers_clickable=(setting)
Allow the column title buttons to be clicked.
  • setting: true if the columns are clickable.
  • Returns: self
set_headers_clickable(setting)
Same as Gtk::TreeView#headers_clickable=.
  • setting: true if the columns are clickable.
  • Returns: self
rules_hint?
Gets the setting set by Gtk::TreeView#rules_hint=.
  • Returns: true if rules are useful for the user of this tree
rules_hint=(setting)
This method 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 method 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).
  • setting: true if the tree requires reading across rows
  • Returns: setting
set_rules_hint(setting)
Same as Gtk::TreeView#rules_hint=.
  • setting: true if the tree requires reading across rows
  • Returns: self
append_column(column)
Appends column to the list of columns.
remove_column(column)
Removes column from the Gtk::TreeView.
insert_column(column, position)
This inserts the column into the Gtk::TreeView at position. If position is -1, then the column is inserted at the end.
  • column: The Gtk::TreeViewColumn to be inserted.
  • position: The position to insert column in.
  • Returns: The number of columns in the Gtk::TreeView after insertion.
insert_column(position, title, cell, attributes)
Creates a new Gtk::TreeViewColumn and inserts it into the Gtk::TreeView at position. If position is -1, then the newly created column is inserted at the end. The column is initialized with the attributes given.
insert_column(position, title, cell) {|tvc, cell, model, iter| ... }
Convenience method that inserts a new column into the Gtk::TreeView with the given cell renderer and a Block to set cell renderer attributes (normally using data from the model). See also Gtk::TreeViewColumn#set_cell_data_func, Gtk::TreeViewColumn#pack_start.
  • position: Position to insert, -1 for append
  • title: column title
  • cell: cell renderer for column
  • {|tvc, cell, model, iter| ... }: A block to set the properties of a cell instead of just using the straight mapping between the cell and the model. This is useful for customizing the cell renderer. For example, a block might get an Integer from the model, and render it to the "text" attribute of "cell" by converting it to its written equivilent. This is set by calling Gtk::TreeViewColumn#set_cell_data_func
  • Returns: number of columns in the tree view post-insert
get_column(n)
Gets the Gtk::TreeViewColumn at the given position in the Gtk::TreeView.
  • n: The position of the column, counting from 0.
  • Returns: The Gtk::TreeViewColumn, or nil if the position is outside the range of columns.
columns
Returns an array of all the Gtk::TreeViewColumn s currently in the Gtk::TreeView.
move_column_after(column, base_column)
Moves column to be after to base_column. If base_column is nil, then column is placed in the first position.
  • column: The Gtk::TreeViewColumn to be moved.
  • base_column: The GtkTreeViewColumn to be moved relative to, or nil.
  • Returns: self
expander_column
Returns the column that is the current expander column. This column has the expander arrow drawn next to it.
  • Returns : The expander column.
expander_column=(column)
Sets the Gtk::TreeViewColumn to draw the expander arrow at. It must be in the Gtk:TreeView. If column is nil, then the expander arrow is always at the first visible column.
set_expander_column(column)
Same as Gtk::TreeView#expander_column=.
  • column: nil, or the column to draw the expander arrow at.
  • Returns: self
set_column_drag_function{|tree_view, column, prev_column, next_column| ... }
Sets a block for determining where a column may be dropped when dragged. This method is called on every column pair in turn at the beginning of a column drag to determine where a drop can take place. The arguments passed to func are: the tree_view, the Gtk::TreeViewColumn being dragged, the two Gtk::TreeViewColumn s determining the drop spot. If either of the Gtk::TreeViewColumn arguments for the drop spot are nil, then they indicate an edge.
  • {|tree_view, column, prev_column, next_column| ... }: a block for determining whether column can be dropped in a particular spot (as determined by prev_column and next_column). In left to right locales, prev_column is on the left of the potential drop spot, and next_column is on the right. In right to left mode, this is reversed. This method should return true if the spot is a valid drop spot. Please note that returning true does not actually indicate that the column drop was made, but is meant only to indicate a possible drop spot to the user.
scroll_to_point(tree_x, tree_y)
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 Gtk::TreeView must be realized before this method is called. If it isn't, you probably want to be using Gtk::TreeView#scroll_to_cell. If either tree_x or tree_y are -1, then that direction isn't scrolled.
  • 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
  • Returns: self
scroll_to_cell(path, column, use_align, row_align, col_align)
Moves the alignments of the Gtk::TreeView to the position specified by column and path. If column is nil, then no horizontal scrolling occurs. Likewise, if path is nil no vertical scrolling occurs. At a minimum, one of column or path need to be non-nil. 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 false, 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 it's current position. If the cell is currently visible on the screen, nothing is done. This method only works if the model is set, and path is a valid row on the model. If the model changes before the Gtk::TreeView is realized, the centered path will be modified to reflect this change.
  • path: The Gtk::TreePath of the row to move to, or nil.
  • column: The Gtk::TreeViewColumn to move horizontally to, or nil.
  • use_align: whether to use alignment arguments, or false.
  • row_align: The vertical alignment of the row specified by path between 0.0 and 1.0.
  • col_align: The horizontal alignment of the column specified by column between 0.0 and 1.0.
  • Returns: self
cursor
Gets the current path and focus column. If the cursor isn't currently set, then path will be nil. If no column currently has focus, then focus_column will be nil.
  • Returns: [path, focus_column]
    • path: the current cursor path, or nil
    • focus_column: the current focus column, or nil
set_cursor(path, focus_column, start_editing)
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 column is not nil, then focus is given to the column specified by it. Additionally, if column is specified, and start_editing is true, then editing should be started in the specified cell. This method is often followed by Gtk::Widget#grab_focus in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.
row_activated(path, column)
Activates the cell determined by path and column.
expand_all
Recursively expands all nodes in the Gtk::TreeView.
  • Returns: self
collapse_all
Recursively collapses all visible, expanded nodes in the Gtk::TreeView.
  • Returns: self
expand_row(path, open_all)
Opens the row so its children are visible.
  • path: a Gtk::TreePath to a row in the Gtk::TreeView
  • open_all: whether to recursively expand, or just expand immediate children
  • Returns: true if the row existed and had children
collapse_row(path)
Collapses a row (hides its child rows, if they exist).
map_expanded_rows {|tree_view, path| ... }
Calls block on all expanded rows.
  • {|tree_view, path| ... }
row_expanded?(path)
Returns true if the node pointed to by path is expanded in Gtk::TreeView.
  • path: A Gtk::TreePath to test expansion state.
  • Returns: true if path is expanded.
reorderable?
Retrieves whether the user can reorder the tree via drag-and-drop. See Gtk::TreeView#reorderable=.
  • Returns: true if the tree can be reordered.
reorderable=(reorderable)
This method is a convenience method to allow you to reorder models that support the Gtk::TreeDragSource and the Gtk::TreeDragDest. Both Gtk::TreeStore and Gtk::ListStore support these. If reorderable is true, 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 signals. This method does not give you any degree of control over the order -- any reorderering is allowed. If more control is needed, you should probably handle drag and drop manually.
  • reorderable : true, if the tree can be reordered.
  • Returns: reorderable
set_reorderable(reorderable)
Same as Gtk::TreeView#reorderable=.
  • reorderable: true, if the tree can be reordered.
  • Returns: self
get_path(x, y)
get_path_at_pos(x, y)
Finds the path at the point (x, y), relative to widget coordinates. That is, x and y are relative to an events coordinates. x and y must come from an event on the tree_view only where event.window == Gtk::TreeView#bin_window. It is primarily for things like popup menus. This method is only meaningful if Gtk::TreeView is realized.
  • x: The x position to be identified.
  • y: The y position to be identified.
  • Returns: [path, column, cell_x, cell_y] if a row exists at that coordinate or nil
    • path: A pointer to a Gtk::TreePath pointer to be filled in, or nil
    • column: A pointer to a Gtk::TreeViewColumn pointer to be filled in, or nil
    • cell_x: A pointer where the X coordinate relative to the cell can be placed, or nil
    • cell_y: A pointer where the Y coordinate relative to the cell can be placed, or nil
get_cell_area(path, column)
Returns the Gdk::Rectangle in tree window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a path not currently displayed, the y and height fields of the rectangle will be 0. If column is nil, the x and width fields will be 0. The sum of all cell rects does not cover the entire tree; there are extra pixels in between rows, for example. The returned rectangle is equivalent to the cell_area passed to Gtk::CellRenderer#render. This method is only valid if Gtk::TreeView is realized.
get_background_area(path, column)
Fills the bounding rectangle in tree window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a node not found in the tree, the y and height fields of the rectangle will be filled with 0. If column is nil, the x and width fields will be filled with 0. The returned rectangle is equivalent to the background_area passed to Gtk::CellRenderer#render. These background areas tile to cover the entire tree window (except for the area used for header buttons). Contrast with the cell_area, returned by Gtk::TreeView#get_cell_area, which returns only the cell itself, excluding surrounding borders and the tree expander area.
visible_rect
Returns the currently-visible region of the buffer, in tree coordinates. Convert to widget coordinates with Gtk::TreeView#tree_to_widget_coords. Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire scrollable area of the tree.
visible_range
Returns start and end paths to be the first and last visible path. Note that there may be invisible paths in between. Since 2.8
  • Returns: [start_path, end_path] or nil if valid paths were not found.
    • start_path: start of region
    • end_path: end of region
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 the Gtk::TreeView is on the right window.
widget_to_tree_coords(wx, wy)
Converts widget coordinates to coordinates for the tree window (the full scrollable area of the tree).
  • wx: widget X coordinate
  • wy: widget Y coordinate
  • Returns: [tx, ty]
    • tx: return location for tree X coordinate
    • ty: return location for tree Y coordinate
tree_to_widget_coords(tx, ty)
Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates.
  • tx: tree X coordinate
  • ty: tree Y coordinate
  • Returns: [wx, wy]
    • wx: return location for widget X coordinate
    • wy: return location for widget Y coordinate
enable_model_drag_dest(targets, actions)
  • targets: an array of target entries. [[target, flags, info], ... ]. A target entry array represents a single type of data than can be supplied for by a widget for a selection or for supplied or received during drag-and-drop.
    • target: A string representing the drag type
    • flags: A flags field (used only for drag and drop - see Gtk::Drag#TargetFlags
    • info: An application assigned integer ID. The integer ID will later be passed as a signal parameter for signals like "selection_get". It allows the application to identify the target type without extensive string compares.
  • actions: a GdkDragAction?
  • Returns: self
enable_model_drag_source(start_button_mask, targets, actions)
  • start_button_mask: GdkModifierType
  • targets: an array of target entries. [[target, flags, info], ... ]. A target entry array represents a single type of data than can be supplied for by a widget for a selection or for supplied or received during drag-and-drop.
    • target: A string representing the drag type
    • flags: A flags field (used only for drag and drop - see GtkTargetFlags)
    • info: An application assigned integer ID. The integer ID will later be passed as a signal parameter for signals like "selection_get". It allows the application to identify the target type without extensive string compares.
  • actions: a GdkDragAction?
  • Returns: self
unset_rows_drag_dest
  • Returns: self
unset_rows_drag_source
  • Returns: self
drag_dest_row
set_drag_dest_row(path, position)
get_dest_row(drag_x, drag_y)
get_dest_row_at_pos(drag_x, drag_y)
create_row_drag_icon(path)
Creates a Gdk::Pixmap representation of the row at path. This image is used for a drag icon.
enable_search?
Returns whether or not the tree allows interactive searching.
  • Returns: whether or not to let the user search interactively
enable_search=(enable_search)
If enable_search is set, then the user can type in text to search through the tree interactively.
  • enable_search : true, if the user can search interactively
  • Returns: enable_search
set_enable_search(enable_search)
Same as Gtk::TreeView#enable_search=.
  • enable_search : true, if the user can search interactively
  • Returns: self
search_column
Gets the column searched on by the interactive search code.
  • Returns : the column the interactive search code searches in
search_column=(column)
Sets column as the column where the interactive search code should search in. Additionally, turns on interactive searching.
  • column: the column to search in
  • Returns: column
set_search_column(column)
Same as Gtk::TreeView#search_column=.
  • column: the column to search in
  • Returns: self
set_search_equal_func {|model, columnm, key, iter| ... }
Sets the compare block for the interactive search capabilities.
  • {|model, columnm, key, iter| ... }
    • model: a Gtk::TreeModel
    • column: a Column number
    • key: a String
    • iter: a Gtk::TreeIter
    • Returns: true to continue, or false to quit(the word is matched).
  • Returns: self
fixed_height_mode?
Returns whether fixed height mode is turned on. Since 2.6
  • Returns: true if in fixed height mode.
fixed_height_mode=(enable)
Enables or disables the fixed height mode. Fixed height mode speeds up Gtk::TreeView 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::TreeViewColumn::FIXED. Since 2.6
  • enable: true to enable fixed height mode.
  • Returns: enable
set_fixed_height_mode(enable)
Same as Gtk::TreeView#fixed_height_mode=. Since 2.6
  • enable: true to enable fixed height mode.
  • Returns: self
hover_selection?
Returns whether hover selection mode is turned on. Since 2.6
  • Returns: true if in hover selection mode.
hover_selection=(hover)
Enables of disables the hover selection mode. Hover selection makes the selected row follow the pointer. Currently, this works only for the selection modes Gtk::SELECTION_SINGLE and Gtk::SELECTION_BROWSE. Since 2.6
  • hover: true to enable hover selection mode.
  • Returns: hover
set_hover_selection(hover)
Same as Gtk::TreeView#hover_selection=. Since 2.6
  • hover: true to enable hover selection mode.
  • Returns: self
hover_expand?
Returns whether hover expansion mode is turned on. Since 2.6
  • Returns: true if in hover expansion mode.
hover_expand=(expand)
Enables of disables the hover expansion mode. Hover expansion makes rows expand or collaps if the pointer moves over them. Since 2.6
  • expand: true to enable hover expansion mode.
  • Returns: expand
set_hover_expand(expand)
Same as Gtk::TreeView#hover_expand=. Since 2.6
  • expand: true to enable hover expansion mode.
  • Returns: self
set_row_separator_func{|model, iter| ... }
Sets the row separator block, which is used to determine whether a row should be drawn as a separator. If the block separator function is nil, no separators are drawn. This is the default value. Since 2.6
  • {|model, iter| ... } the decision block
convert_bin_window_to_tree_coords
  • Returns: self: FIXME
convert_bin_window_to_widget_coords
  • Returns: self: FIXME
convert_tree_to_bin_window_coords
  • Returns: self: FIXME
convert_tree_to_widget_coords
  • Returns: self: FIXME
convert_widget_to_bin_window_coords
  • Returns: self: FIXME
convert_widget_to_tree_coords
  • Returns: self: FIXME
enable_grid_lines
Gets the value whether grid lines should be drawn in the tree view or not.
  • Returns: true if grid lines should be drawn in the tree view
enable_grid_lines=(enable_grid_lines)
Sets the value whether grid lines should be drawn in the tree view or not.
  • enable_grid_lines: true if grid lines should be drawn in the tree view
  • Returns: enable_grid_lines
enable_tree_lines=(enable_tree_lines)
Sets the value whether tree lines should be drawn in the tree view or not.
  • enable_tree_lines: true if tree lines should be drawn in the tree view
  • Returns: enable_tree_lines
enable_tree_lines?
Gets the value whether tree lines should be drawn in the tree view or not.
  • Returns: true if tree lines should be drawn in the tree view
expand_collapse_cursor_row
  • Returns: self: FIXME
expand_to_path
  • Returns: self: FIXME
headers_clickable?
Gets the Column headers respond to click events.
  • Returns: Column headers respond to click events
level_indentation
Gets the Extra indentation for each level.
  • Returns: Extra indentation for each level
level_indentation=(level_indentation)
Sets the Extra indentation for each level.
  • level_indentation: Extra indentation for each level
  • Returns: level_indentation
move_cursor
  • Returns: self: FIXME
ref_accessible
See Atk::Implementor#ref_accessible.
rubber_banding=(rubber_banding)
Sets the value whether to enable selection of multiple items by dragging the mouse pointer or not.
  • rubber_banding: true if to enable selection of multiple items by dragging the mouse pointer
  • Returns: rubber_banding
rubber_banding?
Gets the value whether to enable selection of multiple items by dragging the mouse pointer or not.
  • Returns: true if to enable selection of multiple items by dragging the mouse pointer
search_entry
  • Returns: self: FIXME
select_all
  • Returns: self: FIXME
select_cursor_parent
  • Returns: self: FIXME
select_cursor_row
  • Returns: self: FIXME
set_cursor_on_cell
  • Returns: self: FIXME
set_enable_grid_lines(enable_grid_lines)
Same as enable_grid_lines=.
  • enable_grid_lines: true if grid lines should be drawn in the tree view
  • Returns: self
set_enable_tree_lines(enable_tree_lines)
Same as enable_tree_lines=.
  • enable_tree_lines: true if tree lines should be drawn in the tree view
  • Returns: self
set_level_indentation(level_indentation)
Same as level_indentation=.
  • level_indentation: Extra indentation for each level
  • Returns: self
set_rubber_banding(rubber_banding)
Same as rubber_banding=.
  • rubber_banding: true if to enable selection of multiple items by dragging the mouse pointer
  • Returns: self
set_scroll_adjustments
  • Returns: self: FIXME
set_search_entry
  • Returns: self: FIXME
set_search_position_func
  • Returns: self: FIXME
set_show_expanders(show_expanders)
Same as show_expanders=.
  • show_expanders: View has expanders
  • Returns: self
set_tooltip_column(tooltip_column)
Same as tooltip_column=.
  • tooltip_column: The column in the model containing the tooltip texts for the rows
  • Returns: self
show_expanders=(show_expanders)
Sets the View has expanders.
  • show_expanders: View has expanders
  • Returns: show_expanders
show_expanders?
Gets the View has expanders.
  • Returns: View has expanders
start_interactive_search
  • Returns: self: FIXME
toggle_cursor_row
  • Returns: self: FIXME
tooltip_column
Gets the column in the model containing the tooltip texts for the rows.
  • Returns: The column in the model containing the tooltip texts for the rows
tooltip_column=(tooltip_column)
Sets the column in the model containing the tooltip texts for the rows.
  • tooltip_column: The column in the model containing the tooltip texts for the rows
  • Returns: tooltip_column
unselect_all
  • Returns: self: FIXME
add_child
See Gtk::Buildable#add_child.
construct_child
See Gtk::Buildable#construct_child.
get_internal_child
See Gtk::Buildable#get_internal_child.
name
See Gtk::Buildable#name.
name=
See Gtk::Buildable#name=.
set_buildable_property
See Gtk::Buildable#set_buildable_property.
set_name
See Gtk::Buildable#set_name.
builder_name
See Gtk::Buildable#builder_name.
builder_name=
See Gtk::Buildable#builder_name=.
set_builder_name
See Gtk::Buildable#set_builder_name.

Constants

GtkTreeViewDropPosition

Determining where a dropped row goes.

DROP_BEFORE
drop before this row
DROP_AFTER
drop after this row
DROP_INTO_OR_BEFORE
drop as a child of this row (with fallback to before if into is not possible)
DROP_INTO_OR_AFTER
drop as a child of this row (with fallback to after if into is not possible)
GRID_LINES_BOTH
GRID_LINES_HORIZONTAL
GRID_LINES_NONE
GRID_LINES_VERTICAL

Properties

enable-search: true or false (Read/Write)
View allows user to search through columns interactively
expander-column: Gtk::TreeViewColumn (Read/Write)
Set the column for the expander column
fixed-height-mode; true or false (Read/Write)
Speeds up Gtk::TreeView by assuming that all rows have the same height Since 2.4
hadjustment: Gtk::Adjustment (Read/Write)
Horizontal Adjustment for the widget
headers-clickable: true or false (Write)
Column headers respond to click events
headers-visible: true or false (Read/Write)
Show the column header buttons
hover-expand: true or false (Read/Write)
Enables of disables the hover expansion mode of TreeView. Hover expansion makes rows expand or collaps if the pointer moves over them. This mode is primarily indended for treeviews in popups, e.g. in Gtk::ComboBox or Gtk::EntryCompletion. Since 2.6
hover-selection: true or false (Read/Write)
Enables of disables the hover selection mode of TreeView. Hover selection makes the selected row follow the pointer. Currently, this works only for the selection modes Gtk::SELECTION_SINGLE and Gtk::SELECTION_BROWSE. This mode is primarily indended for treeviews in popups, e.g. in Gtk::ComboBox or Gtk::EntryCompletion. Since 2.6
model: Gtk::TreeModel (Read/Write)
The model for the tree view
reorderable: true or false (Read/Write)
View is reorderable
rules-hint: true or false (Read/Write)
Set a hint to the theme engine to draw rows in alternating colors
search-column: Integer (Read/Write)
Model column to search through when searching through code
vadjustment: Gtk::Adjustment (Read/Write)
Vertical Adjustment for the widget
enable-grid-lines: Gtk::TreeViewGridLines (Read/Write)
Whether grid lines should be drawn in the tree view
enable-tree-lines: true or false (Read/Write)
Whether tree lines should be drawn in the tree view
fixed-height-mode: true or false (Read/Write)
Speeds up Gtk::TreeView by assuming that all rows have the same height
level-indentation: Integer (Read/Write)
Extra indentation for each level
rubber-banding: true or false (Read/Write)
Whether to enable selection of multiple items by dragging the mouse pointer
show-expanders: true or false (Read/Write)
View has expanders
tooltip-column: Integer (Read/Write)
The column in the model containing the tooltip texts for the rows

Style Properties

allow-rules: true or false (Read)
Allow drawing of alternating color rows
even-row-color: Gdk::Color (Read)
Color to use for even rows
expander-size: Integer (Read)
Size of the expander arrow
grid-line-pattern: String (Read)
Dash pattern used to draw the tree view grid lines
grid-line-width: Integer (Read)
Width, in pixels, of the tree view grid lines
horizontal-separator: Integer (Read)
Horizontal space between cells. Must be an even number
indent-expanders: true or false (Read)
Make the expanders indented
odd-row-color: Gdk::Color (Read)
Color to use for odd rows
row-ending-details: true or false (Read)
Enable extended row background theming
tree-line-pattern: String (Read)
Dash pattern used to draw the tree view lines
tree-line-width: Integer (Read)
Width, in pixels, of the tree view lines
vertical-separator: Integer (Read)
Vertical space between cells. Must be an even number

Signals

columns-changed: self
The "columns-changed" signal is emitted when a column has been added to, removed from or moved in tree view.
cursor-changed: self
The "cursor-changed" signal is emitted when the tree view cursor moves (i.e. focus on a cell is changed) or is set.
expand-collapse-cursor-row: self, arg1, arg2, arg3
  • self: the Gtk::TreeView
  • arg1: true or false
  • arg2: true or false
  • arg3: true or false
move-cursor: self, step, arg1
row-activated: self, path, column
The "row-activated" signal is emitted when the method Gtk::TreeView#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. The cell is determined by path and column.
row-collapsed: self, iter, path
The given row has been collapsed (child nodes are hidden).
row-expanded: self
The given row has been expanded (child nodes are shown)
select-all: self
select-cursor-parent: self
select-cursor-row: self, arg1
set-scroll-adjustments: self, adj1, adj2
start-interactive-search: self
test-collapse-row: self
test-expand-row: self
toggle-cursor-row: self
unselect-all: self