Le Wed, 7 Jul 2010 08:12:31 -0700 (PDT),
MethodCZ <[email protected]> a écrit :

> 
> Hi,
> 
> In the morning i didn't think it will be necessary to ask here,
> however after all day which i spent trying to figure how to get
> values from my TreeView, i'm kinda hopeless.
> 
> My problem is that i have have a TreeView with Model and everything
> required where user can add/remove nodes. (it's actually only one
> level of nodes so it's not really tree). User can add multiple nodes.
> This is ok and i had no problem to wrote that. Problem is that i need
> to join all the values of all the nodes into one single string
> variable. (My treeview has only 1 column)
> 
> So for example user adds values "a", "b", "c" and i want to join it
> into string val = "abc".
> 
> I did some research on this and found few ideas how to do this from
> using TreeModel.Foreach function to some suggestions to use Do cycle
> etc. but none of them worked :{
> 
> Thanks for any ideas :]

Here is my way to browse ListStore:

TreeIter iter;
if(ListStore.GetIterFirst(out iter)){
        do{
        myvalue = ListStore.GetValue(iter,column);
        //make treatment on myvalue.
        while(ListStore.NextIter(ref iter));
        }
}

Can do same way with TreeStore I think.

PS: Sorry for my bad English I don't speak it very often.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to