[Gtk-sharp-list] Problem with CellRendererToggle in a TreeViewColumn with multiple CellRenderers

Matthew Pirocchi matthew.pirocchi at gmail.com
Mon Mar 1 16:52:58 EST 2010

Thanks Dave, this works perfectly.

On Mon, Mar 1, 2010 at 3:55 PM, Dave Glick <somedave at yahoo.com> wrote:
> I had this problem too. For the other CellRenderers in your TreeViewColumn,
> set "renderer.Mode = CellRendererMode.Activatable;" What happens is if the
> other renderers are not activatable, the TreeViewColumn passes on clicks to
> the renderer that is. By making the other ones activatable, you're telling
> the TreeViewColumn that they can receive clicks rather than passing them to
> the toggle renderer.
> -----Original Message-----
> From: gtk-sharp-list-bounces at lists.ximian.com
> [mailto:gtk-sharp-list-bounces at lists.ximian.com] On Behalf Of Matthew
> Pirocchi
> Sent: Monday, March 01, 2010 3:07 PM
> To: gtk-sharp-list at lists.ximian.com
> Subject: [Gtk-sharp-list] Problem with CellRendererToggle in a
> TreeViewColumn with multiple CellRenderers
> I have a TreeModel representing a tree of Tags. Each Tag has these
> properties, among others:
> string Name
> bool Active
> Tag Parent
> TagList Children (basically just a List<Tag>)
> The TreeView has a single column, with two CellRenderers: a
> CellRendererToggle for Active, and a CellRendererText for name. I want
> them in the same column, because multiple columns gets messy as you
> get farther down the descendants in the TreeView.
> My problem is that when I click *anywhere* in the column, the
> CellRendererToggle is toggled. This is problematic, because I want to
> do things like dragging the tags, and renaming them inline. Is there
> any way to make the CellRendererToggle *only* get toggled when I click
> on the checkbox itself, without moving it to a separate column?
> _______________________________________________
> 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