[Gtk-sharp-list] TreeCellDataFunc: How often and why?

Brad Taylor brad at getcoded.net
Wed May 2 16:03:08 EDT 2007


On Wed, 2007-05-02 at 14:48 -0500, Michael Fasolino wrote:
> 
> I currently have a design in which I am using a TreeCellDataFunc to
> render values of a class that I am storing in a TreeStore to a several
> editable columns in a TreeView.   
> This worked great until I added a button that sets all the values back
> to defaults.  The source class gets updated, but the TreeView is not
> updated to reflect the changes until I move the mouse over it. 
>   
> So, my problem is that I can’t seem to find a list of events that
> trigger the TreeCellDataFunc to run.  It seems that pointing the
> cursor at the TreeView is an event which makes it run, but is seems
> like there must be a way that I can force it to run from the code that
> is activated by my Defaults button.   
> 
> Also, it would be ideal if I could control when the TreeCellDataFunc
> runs so that I can run it after I first populate the source class,
> then after that only when I change the data from within my
> application.  I am afraid it will take a bunch of overhead to run the
> fairly complex code within the TreeCellDataFunc whenever the user pans
> past the TreeView with the mouse.  Is there any way to control which
> events trigger the TreeCellDataFunc to run. 
> 
> I assume this is not a difficult thing, but could not figure out how
> to do it! 
> 
> Any help would be greatly appreciated! 

Check out EmitRowChanged on Gtk.TreeModel (which TreeStore implements).

Docs:  http://go-mono.org/docs/monodoc.ashx?link=T%3aGtk.TreeModel%2f*


Cheers,

-Brad




More information about the Gtk-sharp-list mailing list