Re: Adding GtkTreeStore columns after instantiation.



murrayc t-online de (Murray Cumming) writes:

> gtk_tree_store_new() and gtk_tree_store_newv() allow us to specify the
> number of columns, and the column types. Is it possible to add columns
> to a GtkTreeStore after that?

The number of columns in a model is fixed.  This cannot change.

> I also noticed that GtkTreeView does have a
> gtk_tree_view_append_column() function. But I guess that each
> GtkTreeView column corresponds to a GtkTreeStore column. So what governs
> the mapping?

No -- that's not the case.  You make a mapping from a column on the
model to a property on a cell_renderer on a view_column.  This is a
little confusing, unfortunately.  You might want to read a short paper I
wrote on it at:

  http://people.redhat.com/jrb/files/treeview.tex

Thanks,
-Jonathan



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