RE: More GtkTreeModel/View questions



I created a GtkTreeStore, populated it (I think), and then created a
GtkTreeView associated with that model.  Then I created a CellRenderer
and ColumnView for each column.  Last, I added each column to my view
with gtk_tree_view_append_column.  

 That's exactly the procedure I think . You have create the view(tree view) and 
 have associtad the model (tree store) with it . 

So my questions are:  Did I do this right?  Did I forget anything?  I am
assuming I must have, or I did something wrong, because I can't see any
of the data in my model.  Also, do I need one CellRenderer and one
ColumnView for each column I want to display in my TreeModel?  

 Where is the data ? I guess you have added the columns but 
 have put put the data into the model . 
 (do you have something like gtk_tree_store_append/gtk_tree_store_set 
 or gtk_tree_store_insert  to fill the store with the data)
  
 You can have a look at the examples in the gtk-demo(They are very helpful in understanding 
 the GtkTreeModel/GtkTreeView relationship )
 
 Files to look at 
 gtk+/demos/gtk-demo/tree_store.c (for TreeView/TreeStore )
 gtk+/demos/gtk-demo/list_store.c (for TreeView/ListStore )
 Also run the gtk-demo application. 

   
 Satyajit




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