[Gtk-sharp-list] Adding Managed Data to Trees
Miguel de Icaza
miguel@ximian.com
12 Jan 2003 00:37:34 -0500
Hello,
> I'm wondering how (assuming that it's possible) "managed"
> (mono-maintained) data can be added to a Gtk# TreeStore or TreeView.
>
> For example, suppose that you're writing a file manager (Nautilus#?).
> You don't want to load the entire file system tree all at once. Rather,
> when a node is selected, at *that* point you want to be able to search
> for child directories/files and add them to the tree view.
The TreeStore seems to be a "default" implementation of the TreeModel
that the TreeView uses and it uses the Iters are you saw them. Maybe an
option is to have a more C#-ish model implementation for Gtk#
applications instead of the C-ish mode that we have now.
Anyways, I have not attempted that, but I have a workaround for this
case in the monodoc browser that hooks up to the RowExpanded signal and
tracks the information in a hashtable to be able to populate the tree on
demand.
Miguel