[ CCode ( has_construct_function = false ) ]
public TreeViewColumn.with_attributes (string? title, CellRenderer cell, ...)
Creates a new `GtkTreeViewColumn` with a number of default values.
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:
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);
}
title |
The title to set the header to |
cell |
The `GtkCellRenderer` |
... |
A null-terminated list of attributes |
A newly created `GtkTreeViewColumn`. |