[Gtk-sharp-list] Dynamically populating a TreeStore

Chris Ridd chris.ridd@isode.com
Mon, 16 Aug 2004 18:38:47 +0100

It is relatively straightforward to fill a TreeStore object with static
data, but I'm having real problems understanding how to put dynamically
changing data into a TreeStore.

In my case I want to associate each node in the store with an LDAP
connection; the node will know the name of the entry it represents, and will
know if it knows about any subordinate entries in the LDAP directory.

The recommended way to do this in C programs *seems* to be to stash extra
information away in the TreeIter associated with a node. However, the fields
in TreeIter for doing this seem to be private (_user_data*) in C#.

None of the examples I've looked at (monodoc, gtk-sharp/samples) seem
terribly oriented towards data that isn't all known at model creation time.

I suspect I'm looking at things the wrong way.

Can anyone provide me with a clue, or the recommended/expected approach?