summaryrefslogtreecommitdiff
path: root/gtk/gtktreeviewcolumn.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2002-03-15 21:47:52 +0000
committerJonathan Blandford <jrb@src.gnome.org>2002-03-15 21:47:52 +0000
commit60a1fa69d0fe4f633e090e12ca056f2dbaf511b9 (patch)
tree505ae98a48774ecaf6d1c2d89b4ad17cc5b263ab /gtk/gtktreeviewcolumn.c
parenta1a8f1b6c3830afdd89c8a1bf54ff078c558f182 (diff)
downloadgtk+-60a1fa69d0fe4f633e090e12ca056f2dbaf511b9.tar.gz
add example to docs, as people are seeming to have trouble with this
Fri Mar 15 12:51:42 2002 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_new_with_attributes): add example to docs, as people are seeming to have trouble with this function. Remake docs as well.
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r--gtk/gtktreeviewcolumn.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 394608ac19..666f25d473 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -1075,6 +1075,22 @@ gtk_tree_view_column_new (void)
* 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:
+ * <informalexample><programlisting>
+ * <!>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);
+ * <!>}
+ * </programlisting></informalexample>
*
* Return value: A newly created #GtkTreeViewColumn.
**/