Constructor
Gtk.TreeViewColumn.new_with_attributes
Declaration [src]
GtkTreeViewColumn*
gtk_tree_view_column_new_with_attributes (
const char* title,
GtkCellRenderer* cell,
...
)
Description [src]
Creates a new GtkTreeViewColumn
with a number of default values.
This is equivalent to calling gtk_tree_view_column_set_title()
,
gtk_tree_view_column_pack_start()
, and
gtk_tree_view_column_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);
}
Parameters
title |
const char* |
The title to set the header to |
|
Ownership is not transferred to the callee | |
The string is a NUL terminated UTF-8 string | |
cell |
GtkCellRenderer |
The |
|
Ownership is not transferred to the callee | |
... |
|
A |
Return value
Returns: GtkTreeViewColumn |
|
A newly created |
|
Ownership is not transferred to the caller |