Warning: TreeViewColumn is deprecated since 4.10.
A visible column in a [class@Gtk.
Note:
Use [class@Gtk.ColumnView] and [class@Gtk.ColumnViewColumn] instead of [class@Gtk.TreeView] to show a tabular list
TreeView] widget
The `GtkTreeViewColumn` object represents a visible column in a `GtkTreeView` widget. It allows to set properties of the column header, and
functions as a holding pen for the cell renderers which determine how the data in the column is displayed.
Please refer to the [tree widget conceptual overview](section-tree-widget.html) for an overview of all the objects and data types related to
the tree widget and how they work together, and to the [class@Gtk.TreeView] documentation for specifics about the CSS node structure for
treeviews and their headers.
- public bool cell_get_position (CellRenderer cell_renderer, out int x_offset, out int width)
Obtains the horizontal position and size of a cell in a column.
- public void cell_get_size (out int x_offset, out int y_offset, out int width, out int height)
Obtains the width and height needed to render the column.
- public bool cell_is_visible ()
Returns true if any of the cells packed
into the this are visible.
- public void cell_set_cell_data (TreeModel tree_model, TreeIter iter, bool is_expander, bool is_expanded)
Sets the cell renderer based on the tree_model
and iter
.
- public void focus_cell (CellRenderer cell)
Sets the current keyboard focus to be at cell
, if the column
contains 2 or more editable and activatable cells.
- public float get_alignment ()
Returns the current x alignment of this.
- public unowned Widget get_button ()
Returns the button used in the treeview column header
- public bool get_clickable ()
Returns true if the user can click on the
header for the column.
- public bool get_expand ()
Returns true if the column expands to fill
available space.
- public int get_fixed_width ()
Gets the fixed width of the column.
- public int get_max_width ()
Returns the maximum width in pixels of the this
, or -1 if no maximum width is set.
- public int get_min_width ()
Returns the minimum width in pixels of the this
, or -1 if no minimum width is set.
- public bool get_reorderable ()
Returns true if the
this can be reordered by the user.
- public bool get_resizable ()
Returns true if the
this can be resized by the end user.
- public TreeViewColumnSizing get_sizing ()
Returns the current type of this.
- public int get_sort_column_id ()
Gets the logical sort_column_id
that the model sorts on when
this column is selected for sorting.
- public bool get_sort_indicator ()
- public SortType get_sort_order ()
- public int get_spacing ()
Returns the spacing of this.
- public unowned string get_title ()
Returns the title of the widget.
- public unowned Widget? get_tree_view ()
Returns the `GtkTreeView` wherein this has
been inserted.
- public bool get_visible ()
Returns true if
this is visible.
- public unowned Widget? get_widget ()
Returns the `GtkWidget` in the button on the column header.
- public int get_width ()
Returns the current size of this in
pixels.
- public int get_x_offset ()
Returns the current X offset of this in
pixels.
- public void queue_resize ()
Flags the column, and the cell renderers added to this column, to have their
sizes renegotiated.
- public void set_alignment (float xalign)
Sets the alignment of the title or custom widget inside the column header.
- public void set_attributes (CellRenderer cell_renderer, ...)
Sets the attributes in the list as the attributes of
this.
- public void set_clickable (bool clickable)
Sets the header to be active if clickable
is
true.
- public void set_expand (bool expand)
Sets the column to take available extra space.
- public void set_fixed_width (int fixed_width)
If fixed_width
is not -1, sets the fixed width of
this; otherwise unsets it.
- public void set_max_width (int max_width)
Sets the maximum width of the this.
- public void set_min_width (int min_width)
Sets the minimum width of the this.
- public void set_reorderable (bool reorderable)
If reorderable
is true, then
the column can be reordered by the end user dragging the header.
- public void set_resizable (bool resizable)
If resizable
is true, then
the user can explicitly resize the column by grabbing the outer edge of the column button.
- public void set_sizing (TreeViewColumnSizing type)
Sets the growth behavior of this to
type
.
- public void set_sort_column_id (int sort_column_id)
Sets the logical sort_column_id
that this column sorts on when
this column is selected for sorting.
- public void set_sort_indicator (bool setting)
Call this function with a setting
of
true to display an arrow in the header button indicating the column is sorted.
- public void set_sort_order (SortType order)
Changes the appearance of the sort indicator.
- public void set_spacing (int spacing)
Sets the spacing field of this, which is
the number of pixels to place between cell renderers packed into it.
- public void set_title (string title)
Sets the title of the this.
- public void set_visible (bool visible)
Sets the visibility of this.
- public void set_widget (Widget? widget)
Sets the widget in the header to be widget
.