[Glade-users] How to add stuff to treeviews??



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





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