instead of [gtk.tree_view.TreeView] to show a tabular list
gtk.tree_view_column
Module for [TreeViewColumn] class
Types 3
classTreeViewColumn : gobject.initially_unowned.InitiallyUnowned, gtk.buildable.Buildable, gtk.cell_layout.CellLayout
A visible column in a [gtk.tree_view.TreeView] widget
The [gtk.tree_view_column.TreeViewColumn] object represents a visible column in a [gtk.tree_view.TreeView] 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 for an overview of all the objects and data types related to the tree widget and how they work together, and to the [gtk.tree_view.TreeView] documentation for specifics about the CSS node structure for treeviews and their headers.
Deprecated
Use [gtk.column_view.ColumnView] and [gtk.column_view_column.ColumnViewColumn]
Methods
TreeViewColumn self()Returns `this`, for use in `with` statements.TreeViewColumnGidBuilder builder()Get builder for [gtk.treeviewcolumn.TreeViewColumn] Returns: New builder objectfloat alignment() @propertyvoid alignment(float propval) @propertygtk.cell_area.CellArea cellArea() @propertyGet `cellArea` property. Returns: The [gtk.cell_area.CellArea] used to layout cell renderers for this column.bool clickable() @propertyvoid clickable(bool propval) @propertybool expand() @propertyvoid expand(bool propval) @propertyint fixedWidth() @propertyvoid fixedWidth(int propval) @propertyint maxWidth() @propertyvoid maxWidth(int propval) @propertyint minWidth() @propertyvoid minWidth(int propval) @propertybool reorderable() @propertyvoid reorderable(bool propval) @propertybool resizable() @propertyvoid resizable(bool propval) @propertygtk.types.TreeViewColumnSizing sizing() @propertyvoid sizing(gtk.types.TreeViewColumnSizing propval) @propertyint sortColumnId() @propertyGet `sortColumnId` property. Returns: Logical sort column ID this column sorts on when selected for sorting. Setting the sort column ID makes the column header clickable. Set to -1 to make the colu...void sortColumnId(int propval) @propertySet `sortColumnId` property. Params: propval = Logical sort column ID this column sorts on when selected for sorting. Setting the sort column ID makes the column header clickable. Set to -1 to make...bool sortIndicator() @propertyvoid sortIndicator(bool propval) @propertygtk.types.SortType sortOrder() @propertyvoid sortOrder(gtk.types.SortType propval) @propertyint spacing() @propertyvoid spacing(int propval) @propertystring title() @propertyvoid title(string propval) @propertybool visible() @propertyvoid visible(bool propval) @propertygtk.widget.Widget widget() @propertyvoid widget(gtk.widget.Widget propval) @propertyint width() @propertyint xOffset() @propertygtk.tree_view_column.TreeViewColumn newWithArea(gtk.cell_area.CellArea area)Creates a new [gtk.treeviewcolumn.TreeViewColumn] using area to render its cells.void addAttribute(gtk.cell_renderer.CellRenderer cellRenderer, string attribute, int column)Adds an attribute mapping to the list in tree_column.bool cellGetPosition(gtk.cell_renderer.CellRenderer cellRenderer, out int xOffset, out int width)Obtains the horizontal position and size of a cell in a column.void cellGetSize(out int xOffset, out int yOffset, out int width, out int height)Obtains the width and height needed to render the column. This is used primarily by the [gtk.tree_view.TreeView].bool cellIsVisible()Returns true if any of the cells packed into the treecolumn are visible. For this to be meaningful, you must first initialize the cells with [gtk.treeviewcolumn.TreeViewColumn.cellSetCellData] Retu...void cellSetCellData(gtk.tree_model.TreeModel treeModel, gtk.tree_iter.TreeIter iter, bool isExpander, bool isExpanded)Sets the cell renderer based on the treemodel and iter. That is, for every attribute mapping in treecolumn, it will get a value from the set column on the iter, and use that value to set the attri...void clear()Unsets all the mappings on all renderers on the tree_column.void clearAttributes(gtk.cell_renderer.CellRenderer cellRenderer)Clears all existing attributes previously set with [gtk.treeviewcolumn.TreeViewColumn.setAttributes].void clicked()Emits the “clicked” signal on the column. This function will only work if tree_column is clickable.void focusCell(gtk.cell_renderer.CellRenderer cell)Sets the current keyboard focus to be at cell, if the column contains 2 or more editable and activatable cells.float getAlignment()Returns the current x alignment of treecolumn. This value can range between 0.0 and 1.0. Returns: The current alignent of treecolumn.gtk.widget.Widget getButton()Returns the button used in the treeview column header Returns: The button for the column header.bool getClickable()Returns true if the user can click on the header for the column. Returns: true if user can click the column header.bool getExpand()Returns true if the column expands to fill available space. Returns: true if the column expands to fill available space.int getFixedWidth()Gets the fixed width of the column. This may not be the actual displayed width of the column; for that, use [gtk.treeviewcolumn.TreeViewColumn.getWidth]. Returns: The fixed width of the column.int getMaxWidth()Returns the maximum width in pixels of the treecolumn, or -1 if no maximum width is set. Returns: The maximum width of the treecolumn.int getMinWidth()Returns the minimum width in pixels of the treecolumn, or -1 if no minimum width is set. Returns: The minimum width of the treecolumn.bool getReorderable()Returns true if the treecolumn can be reordered by the user. Returns: true if the treecolumn can be reordered by the user.bool getResizable()Returns true if the treecolumn can be resized by the end user. Returns: true, if the treecolumn can be resized.gtk.types.TreeViewColumnSizing getSizing()Returns the current type of treecolumn. Returns: The type of treecolumn.int getSortColumnId()Gets the logical sortcolumnid that the model sorts on when this column is selected for sorting.bool getSortIndicator()Gets the value set by [gtk.treeviewcolumn.TreeViewColumn.setSortIndicator]. Returns: whether the sort indicator arrow is displayedgtk.types.SortType getSortOrder()Gets the value set by [gtk.treeviewcolumn.TreeViewColumn.setSortOrder]. Returns: the sort order the sort indicator is indicatingint getSpacing()Returns the spacing of treecolumn. Returns: the spacing of treecolumn.string getTitle()Returns the title of the widget. Returns: the title of the column. This string should not be modified or freed.gtk.widget.Widget getTreeView()Returns the [gtk.treeview.TreeView] wherein treecolumn has been inserted. If column is currently not inserted in any tree view, null is returned. Returns: The tree view wherein column has been inse...bool getVisible()Returns true if tree_column is visible. Returns: whether the column is visible or not. If it is visible, then the tree will show the column.gtk.widget.Widget getWidget()Returns the [gtk.widget.Widget] in the button on the column header.int getWidth()Returns the current size of treecolumn in pixels. Returns: The current width of treecolumn.int getXOffset()Returns the current X offset of treecolumn in pixels. Returns: The current X offset of treecolumn.void packEnd(gtk.cell_renderer.CellRenderer cell, bool expand)Adds the cell to end of the column. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.void packStart(gtk.cell_renderer.CellRenderer cell, bool expand)Packs the cell into the beginning of the column. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.void queueResize()Flags the column, and the cell renderers added to this column, to have their sizes renegotiated.void setAlignment(float xalign)Sets the alignment of the title or custom widget inside the column header. The alignment determines its location inside the button -- 0.0 for left, 0.5 for center, 1.0 for right.void setCellDataFunc(gtk.cell_renderer.CellRenderer cellRenderer, gtk.types.TreeCellDataFunc func = null)Sets the [gtk.types.TreeCellDataFunc] to use for the column.void setClickable(bool clickable)Sets the header to be active if clickable is true. When the header is active, then it can take keyboard focus, and can be clicked.void setExpand(bool expand)Sets the column to take available extra space. This space is shared equally amongst all columns that have the expand set to true. If no column has this option set, then the last column gets all e...void setFixedWidth(int fixedWidth)If fixedwidth is not -1, sets the fixed width of treecolumn; otherwise unsets it. The effective value of fixedwidth is clamped between the minimum and maximum width of the column; however, the val...void setMaxWidth(int maxWidth)Sets the maximum width of the treecolumn. If maxwidth is -1, then the maximum width is unset. Note, the column can actually be wider than max width if it’s the last column in a view. In this c...void setMinWidth(int minWidth)Sets the minimum width of the treecolumn. If minwidth is -1, then the minimum width is unset.void setReorderable(bool reorderable)If reorderable is true, then the column can be reordered by the end user dragging the header.void setResizable(bool resizable)If resizable is true, then the user can explicitly resize the column by grabbing the outer edge of the column button.void setSizing(gtk.types.TreeViewColumnSizing type)Sets the growth behavior of tree_column to type.void setSortColumnId(int sortColumnId)Sets the logical sortcolumnid that this column sorts on when this column is selected for sorting. Doing so makes the column header clickable.void setSortIndicator(bool setting)Call this function with a setting of true to display an arrow in the header button indicating the column is sorted. Call [gtk.treeviewcolumn.TreeViewColumn.setSortOrder] to change the direction of ...void setSortOrder(gtk.types.SortType order)Changes the appearance of the sort indicator.void setSpacing(int spacing)Sets the spacing field of tree_column, which is the number of pixels to place between cell renderers packed into it.void setTitle(string title)Sets the title of the tree_column. If a custom widget has been set, then this value is ignored.void setVisible(bool visible)Sets the visibility of tree_column.void setWidget(gtk.widget.Widget widget = null)Sets the widget in the header to be widget. If widget is null, then the header button is set with a [gtk.label.Label] set to the title of tree_column.gulong connectClicked(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.tree_view_column.TreeViewColumn)))
&& Parameters!T.length < 2)Connect to `Clicked` signal.classTreeViewColumnGidBuilderImpl(T) : gobject.initially_unowned.InitiallyUnownedGidBuilderImpl!T, gtk.buildable.BuildableGidBuilderImpl!T, gtk.cell_layout.CellLayoutGidBuilderImpl!T
Methods
T alignment(float propval)T cellArea(gtk.cell_area.CellArea propval)Set `cellArea` property. Params: propval = The [gtk.cell_area.CellArea] used to layout cell renderers for this column.T clickable(bool propval)T expand(bool propval)T fixedWidth(int propval)T maxWidth(int propval)T minWidth(int propval)T reorderable(bool propval)T resizable(bool propval)T sizing(gtk.types.TreeViewColumnSizing propval)T sortColumnId(int propval)Set `sortColumnId` property. Params: propval = Logical sort column ID this column sorts on when selected for sorting. Setting the sort column ID makes the column header clickable. Set to -1 to make...T sortIndicator(bool propval)T sortOrder(gtk.types.SortType propval)T spacing(int propval)T title(string propval)T visible(bool propval)T widget(gtk.widget.Widget propval)Fluent builder for [gtk.tree_view_column.TreeViewColumn]
Methods