TreeViewColumn.with_attributes
Description:
[ CCode ( has_construct_function = false ) ]
public TreeViewColumn.with_attributes (string? title, CellRenderer cell, ...)
public TreeViewColumn.with_attributes (string? title, CellRenderer cell, ...)
Creates a new `GtkTreeViewColumn` with a number of default values.
Note:
Use GtkColumnView instead
This is equivalent to calling set_title,
gtk_tree_view_column_pack_start
, and set_attributes on the
newly created `GtkTreeViewColumn`.
Here’s a simple example:
```c enum { TEXT_COLUMN, COLOR_COLUMN, N_COLUMNS }; // ... { GtkTreeViewColumn *column; GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Title", renderer, "text", TEXT_COLUMN, "foreground", COLOR_COLUMN, NULL); } ```
Parameters:
title |
The title to set the header to |
cell |
The `GtkCellRenderer` |
... |
A null-terminated list of attributes |
Returns:
A newly created `GtkTreeViewColumn`. |