Method

GtkCellLayoutadd_attribute

since: 2.4

Declaration [src]

void
gtk_cell_layout_add_attribute (
  GtkCellLayout* cell_layout,
  GtkCellRenderer* cell,
  const gchar* attribute,
  gint column
)

Description [src]

Adds an attribute mapping to the list in cell_layout.

The column is the column of the model to get a value from, and the attribute is the parameter on cell to be set from the value. So for example if column 2 of the model contains strings, you could have the “text” attribute of a GtkCellRendererText get its values from column 2.

Available since: 2.4

Parameters

cell

Type: GtkCellRenderer

A GtkCellRenderer.

The data is owned by the caller of the function.
attribute

Type: const gchar*

An attribute on the renderer.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
column

Type: gint

The column position on the model to get the attribute from.