[Gtk-sharp-list] TreeCellDataFunc not getting pinged

Adam Tauno Williams adam at morrison-ind.com
Thu Apr 12 10:37:30 EDT 2007


> Last night I just ran your code. Tonight I've actually tried to pull 
> apart what you're doing here. Having looked over the docs, all I can 
> suggest is perhaps implementing your own CellRenderer as a better 
> path to what you are trying to do.
> Also, if all you're trying to do is to keep your Tasks in a list and 
> show them by ID, you should know that you can simply insert the 
> values into the list alongside your object using AppendValues("" + 
> t.ObjectId, t). Then you AddColumn()s to the Treeview specifying what 
> gets displayed - in this case your ObjectId would be in a column 
> being rendered by CellRendererText, and the 'column' of Tasks would 
> not be displayed.

Yes, we were previously using a NodeView/NodeStore.  But you can't
[apparently] filter a NodeStore.  Inserting the literal values into the
TreeModel is not sufficient as some of the values may change,  and if
you have just the 'dumb values' in the store then the view will not
reflect this.  When a Task object is modified it signals the widgets
displaying it to update (works great in NodeView/NodeStore, we just
created a custom TreeNode to wrap the Task object).

At this point I think I'll just abandon all the fancy TreeView stuff and
go back to NodeView/NodeStore and implement the search/filtering by
hand.  My concern there is that it will be much slower, as I'll have to
dump and recreate the NodeStore over and over.

If TreeCellDataFunc doesn't work, or isn't recommended, someone should
remove that section from the documentation.
http://www.mono-project.com/GtkSharp_TreeView_Tutorial#Controlling_how_the_model_is_used
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070412/a9a68e8c/attachment.bin 


More information about the Gtk-sharp-list mailing list