Question

I have a single-cloumn treeview in gtk# and I need to get all values from the rows on my treeview

myTreeView.AppendColumn ("Path", new CellRendererText (), "text", 0);
myTreeView.Model = new ListStore (typeof(string));

Is there a way to iterate on each row and get the row value?

Was it helpful?

Solution

I used this and it worked ok for me.

TreeIter iter;
myTreeView.GetIterFirst(out iter);
for (int i = 0; i < myTreeView.IterNChildren(); i++)
{
    myTreeView.GetValue(iter, ... );
    //Do stuff.  
    myTreeView.IterNext(ref iter);   
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top