[Gtk-sharp-list] Recursive TreeStore?
Paulo Pires
paulo.pires@vodafone.pt
Thu, 24 Mar 2005 09:21:11 +0000
Check Gtk.TreeView. Here follows a simple example
<snippet>
TreeView tv =3D new TreeView ();
TreeStore store =3D new TreeStore (typeof (string));
TreeIter iter;
int counter, counter2;
int max =3D 5;
=09
// populate the treeview
counter =3D 0;
while (counter < max)
{
iter =3D store.AppendValues ((string) counter);
=09
counter2 =3D 0;
while (counter2 < max)
{
store.AppendValues (iter, (string) counter2);
counter2++;
}
counter++;
}
tv.Model =3D store;
tv.ExpandAll(); // this is optional wether you want to Expand or not the
TreeView automatically
</snippet>
Qua, 2005-03-23 =E0s 18:11 -0500, Wei Weng escreveu:
>I am not sure if that is the right way to call it.
>
>But how can I achieve the following effect
>
>\--foo
> \--bar
> \--greg
> \--bob
> \--alice
> \--bill
>
>with TreeStore GUIs?
>
>(It would look like collapsing directories.)
>
>Thanks
>
>
>Wei
>
>_______________________________________________
>Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/gtk-sharp-list