gtk-sharp0.0.0.0neutralGtk# 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.CellRendererGLib.IWrapperSystem.IDisposableMethodSystem.VoidDisposes the resources associated with the object.ConstructorInternal constructor
Pointer to the C object.
An instance of CellRendererToggle, wrapping the C object.This is an internal constructor, and should not be used by user code.ConstructorCreates a new .an object of type The default constructor.PropertySystem.BooleanThe can be activated.
an object of type an object of type PropertySystem.BooleanThe toggle state of the .
an object of type an object of type PropertySystem.BooleanDraw the as a .
an object of type an object of type EventGtk.ToggledHandlerEmitted when the cell is clicked.PropertySystem.BooleanThe inconsistent state of the button.
a a 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 a Chain to this constructor if you have manually registered a native value for your subclass.