[Glade-users] How to add stuff to treeviews??
Michael Ekstrand
mekstran at scl.ameslab.gov
Fri May 25 08:06:38 EDT 2007
On Fri, 2007-05-25 at 11:47 +0300, Felipe Balbi wrote:
> After getting my treeview using glade_xml_get_widget() and inserting a
> column with gtk_tree_view_insert_column()... how can I add data to the
> treeview???
You don't add data to a tree view itself, you add it to the TreeModel
which is backing the treeview. So you need to create a GtkTreeModel of
some kind (usually either GtkListStore or GtkTreeStore), populate it,
and assign it to the tree view (with gtk_tree_view_set_model()).
See the following links for more details:
* http://scentric.net/tutorial/
* http://developer.gnome.org/doc/API/2.0/gtk/TreeWidget.html
- Michael
More information about the Glade-users
mailing list