[Glade-users] How to add stuff to treeviews??
- From: mekstran at scl.ameslab.gov (Michael Ekstrand)
- Subject: [Glade-users] How to add stuff to treeviews??
- Date: Fri, 25 May 2007 07:06:38 -0500
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]