TreeViewColumn.with_attributes


Description:

[ CCode ( has_construct_function = false ) ]
public TreeViewColumn.with_attributes (string? title, CellRenderer cell, ...)

Creates a new TreeViewColumn 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 TreeViewColumn.

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);
}

Parameters:

title

The title to set the header to

cell

The CellRenderer

...

A null-terminated list of attributes

Returns:

A newly created TreeViewColumn.




2022 vala-language.org