Re: gtk_list_store
- From: Tim Müller <zen18864 zen co uk>
- To: gtk-app-devel-list gnome org
- Subject: Re: gtk_list_store
- Date: Wed, 5 Jan 2005 14:50:26 +0000
On Sunday 16 May 2004 07:36, Russell Shaw wrote:
I just tried out gtk_list_store. The code below should
display (snip), but i can't get the data (snip) displayed
(only gives a blank row with grey background).
...
renderer=gtk_cell_renderer_text_new();
column=gtk_tree_view_column_new();
gtk_tree_view_column_set_title(column,"Manufacturer");
+ gtk_tree_view_column_set_attribute (column, renderer, "text", NAME);
gtk_tree_view_column_pack_start(column,renderer,FALSE);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree),column);
renderer=gtk_cell_renderer_text_new();
column=gtk_tree_view_column_new();
gtk_tree_view_column_set_title(column,"Web");
gtk_tree_view_column_pack_start(column,renderer,FALSE);
+ gtk_tree_view_column_set_attribute (column, renderer, "text", WWW);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree),column);
renderer=gtk_cell_renderer_text_new();
column=gtk_tree_view_column_new();
gtk_tree_view_column_set_title(column,"Notes");
+ gtk_tree_view_column_set_attribute (column, renderer, "text", NOTES);
gtk_tree_view_column_pack_start(column,renderer,FALSE);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree),column);
....
should do the trick.
http://scentric.net/tutorial/sec-treeview-col-attributes.html
has some more info.
Cheers
-Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]