gtk-sharp2.12.0.0Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.Renders a or a This Class is a implementation that can render a checkbox in your columns.It is important to note that the will not change the corresponding bool field in your itself - you'll need to provide a handler, as shown in the following code snippet:
private TreeStore store;
void SetupTreeView ()
{
store = new TreeStore (typeof (string), typeof(bool));
// populate store..
TreeView tv = new TreeView (store);
tv.HeadersVisible = true;
tv.AppendColumn ("Name", new CellRendererText (), "text", 0);
CellRendererToggle crt = new CellRendererToggle();
crt.Activatable = true;
crt.Toggled += crt_toggled;
tv.AppendColumn ("CheckMe", crt, "active", 1);
// add the TreeView to some window...
}
void crt_toggled(object o, ToggledArgs args) {
TreeIter iter;
if (store.GetIter (out iter, new TreePath(args.Path))) {
bool old = (bool) store.GetValue(iter,1);
store.SetValue(iter,1,!old);
}
}
Gtk.CellRendererConstructorInternal constructor
Pointer to the C object.
This is an internal constructor, and should not be used by user code.ConstructorCreates a new .The default constructor.PropertySystem.BooleanThe can be activated.an object of type GLib.Property("activatable")PropertySystem.BooleanThe toggle state of the .an object of type GLib.Property("active")PropertySystem.BooleanDraw the as a .an object of type GLib.Property("radio")EventGtk.ToggledHandlerEmitted when the cell is clicked.GLib.Signal("toggled")PropertySystem.BooleanThe inconsistent state of the button.a GLib.Property("inconsistent")PropertyGLib.GTypeGType Property.a Returns the native value for .MethodSystem.VoidDefault handler for the event.
a Override this method in a subclass to provide a default handler for the event.ConstructorProtected Constructor.
a Chain to this constructor if you have manually registered a native value for your subclass.System.ObsoletePropertyGLib.Property("indicator-size")System.Int32Size of check or radio indicator.defaults to 12.