Re: GtkTreeViewColumn get column id




I will try to explain it better

I added a column to a treeview with
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes (col_title,
                                                       renderer,
                                                       "text",
                                                       column_id,
                                                       NULL);
gtk_tree_view_append_column (treeview, column);


what I want to do is to print a treeview to a text file with column titles
and  rows.
so I have a function
void print_treeview (GtkTreeView* tr)
I get a list of treeviewcolumns, for every column I get a list of renderers.
when a renderer is a renderertext then I want to get the column id which
this renderer is attached to. then with a list of columns ids I loops
throught a treeview model, get column value from this model and then print
it for every columns ids I found.

the docs says that the attribute "text" of renderertext is of type
gchararray and holds text of some iter from a model.

so, how to get the column id?

please help
hs



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]