Constructor
GtkTreeViewColumnnew_with_attributes
Declaration [src]
GtkTreeViewColumn*
gtk_tree_view_column_new_with_attributes (
const gchar* 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);
}
This constructor is not directly available to language bindings.
Parameters
title
-
Type:
const gchar*
The title to set the header to.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. cell
-
Type:
GtkCellRenderer
The
GtkCellRenderer
.The data is owned by the caller of the function. ...
-
Type:
A
NULL
-terminated list of attributes.
Return value
Type: GtkTreeViewColumn
A newly created GtkTreeViewColumn
.
The data is owned by the called function. |