[Gtk-sharp-list] Databindig IList to a Gtk.TreeView

Michael Hutchinson m.j.hutchinson at gmail.com
Fri Apr 21 10:30:06 EDT 2006


On 4/21/06, Philip Van Hoof <spam at pvanhoof.be> wrote:
> Please take a look:
>
> https://svn.cronos.be/svn/GtkSharpMvc/trunk/
> http://pvanhoof.be/blog/index.php/2006/04/21/databinding-an-ilist-as-datasource-for-the-gtktreeview

Awesome. This definately should be part of GTK# at some point.

I realise it's an early proof of concept, but I can see a couple of
limitations with your implementation
  - with the ListAdaptor kept private, it's hard to use anything other
than a CellRendererText, or to map/set CellRenderer attributes.
  - From what I see, it's not easily possible to insert a
TreeModelFilter and TreeModelSort between the list adaptor TreeModel
and the TreeView. It would be nice to have filtering, sorting
capabilities some other way. If it had grouping too, that would really
make my day and set it part from plain ol' GTK+ :)

Would it be possible to implement this a completely self-contained
TreeModel (maybe a MappingTreemodel) without a need for a
TreeViewAdaptor? Something that just performs mappings? Maybe even
allow delegates for custom mappings?

Really good work anyway; I've always been uncomfortable about having
to use a specialised model for TreeView, even with the NodeStore.


Michael


More information about the Gtk-sharp-list mailing list