Hi,
Can you change the value of a GtkCellRendererToggle in a treeview and If
so how?   I have allowed buttonpress and button release events for the
view, and my code for the togglebutton is

private void RenderCol1 (Gtk.TreeViewColumn column, Gtk.CellRenderer
cell, Gtk.TreeModel model, Gtk.TreeIter iter)
        {
            TreestoreData item = (TreestoreData)model.GetValue (iter, 0);
            if (item.ispath)
            {
                cell.Visible = true;
                (cell as Gtk.CellRendererToggle).Sensitive = true;
                (cell as Gtk.CellRendererToggle).Mode =
CellRendererMode.Editable;
                (cell as Gtk.CellRendererToggle).Toggled += HandleToggled;
                (cell as Gtk.CellRendererToggle).Active = item.included;
            }
            else
                cell.Visible = false;           
        }

Nothing happens when I try to click the button. Can someone tell me
where I am going wrong or what I am missing. Ive looked at Gtk+ 2.0
Treeview tutorial by Tim-Philipp Müller but  didnt see anything to help
me. Also how do I access the item associated with the button in the
toggled event handler as Im not sure that toggling the button would
result in a selection?

Thanks
Alan
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to