[Gtk-sharp-list] How do I update all the CellRenderers in a column when one value in the model changes?

Matthew Pirocchi matthew.pirocchi at gmail.com
Tue Feb 9 20:37:57 EST 2010

Thanks Peter, that's what I needed. I'm just going to go ahead and use
QueueDraw () for now. It won't be used that often, so I doubt
performance will be a problem. Later on I'll test to see how it
scales, and adjust to EmitRowChanged if necessary.

On Tue, Feb 2, 2010 at 3:17 PM, Peter Johanson <peter at peterjohanson.com> wrote:
> Typically for a single row, you would do something like:
> list_store.EmitRowChanged (path, iter);
> And that would trigger the TreeView to refresh that row. For updating
> *every* row, as a fallback you could at least loop the store and emit
> the row changed event.
> Alternately, a treeview.QueueDraw (); might be sufficient to cause the
> whole Gtk.TreeView to redraw, although that's fairly "brute force"
> -pete
> On Tue, Feb 02, 2010 at 03:13:46PM -0500, Matthew Pirocchi wrote:
>>    I have a TreeView whose model is a list of Tags. Each tag has two
>>    properties: Active (bool) and Name (string). There are two columns in
>>    the treeview: a column of CellRendererToggles for Active, and
>>    CellRendererTexts for Name. I use information about which tags are
>>    active to filter what rows are shown in another TreeView.
>>    One of the tags is called "All Tags". When this tag is Active, I want
>>    to disable the checkbox for all the other tags (since it doesn't matter
>>    whether they are active or not). So in the render func for the
>>    checkbox, I set the CellRendererToggle to Sensitive = !allTags.Active
>>    and Activatable = !allTags.Active, if the Tag in the cell is not
>>    allTags. However, these changes do not display until I mouse-over the
>>    cell.
>>    How do I change Active and Sensitivity for multiple
>>    CellRendererToggles, and have the changes display immediately?
>> _______________________________________________
>> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> --
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

More information about the Gtk-sharp-list mailing list