Active Topics

 



Notices


Reply
Thread Tools
Posts: 289 | Thanked: 101 times | Joined on Oct 2009
#1
Could anyone be so sweet to give me a example of a treeview (with two labels) in gtk+/hildon and c or tell me how to do this? I have been sitting a few hours just to get get this. Maybe I'm just tired but this doesn't seem to work for me

This is how far I have come, and no I have absolutly no idea of what I am doing.
Code:
   GtkWidget		*shoppinglist;
   GtkListStore 	*store;
   GtkTreeIter    	iter;

   store = gtk_tree_store_new(1, G_TYPE_STRING);
   shoppinglist = hildon_tree_view_new_with_model (HILDON_UI_MODE_EDIT,GTK_TREE_MODEL (store));   
   hildon_gtk_tree_selection_set_mode (shoppinglist,GTK_SELECTION_SINGLE);


   gtk_list_store_append(store,&iter,NULL);
   gtk_list_store_set (store, &iter,ingredient,-1);

Yours Lullen
 
Posts: 2 | Thanked: 0 times | Joined on Oct 2009
#2
Hi Lullen,

I'm not exactly sure what hildon_tree_view_new_with_model does, but assuming it just creates a normal GtkTreeView, you can find all the information you need in the GtkTreeView tutorial.

http://scentric.net/tutorial/

There is even an example in Section 1.1 which seems to be quite similar to what you are trying to do.

Hope that helps,

Markus
 
Reply


 
Forum Jump


All times are GMT. The time now is 07:08.