gtk.CellRendererToggle Signal Prototypes

Description

The gtk.CellRendererToggle
manages the rendering of toggle button into a gtk.TreeView
cell. The button is drawn as a radio- or checkbutton, depending on the
"radio" property. When activated, it emits the toggled signal.

Constructor

gtk.CellRendererToggle()

Returns :

the new cell renderer

Creates a new gtk.CellRendererToggle.
The toggle button rendering parameters are adjusted using the object
properties. The object properties can be set globally (with set_property()).
Also, with gtk.TreeViewColumn,
you can bind a property to a value in a gtk.TreeModel.
For example, you can bind the "active" property on the cell renderer to a
boolean value in the model, thus causing the check button to reflect the
state of the model.

Methods

gtk.CellRendererToggle.get_radio

def get_radio()

Returns :

True if we're rendering radio toggles rather than checkboxes

The get_radio() method returns
True if radio toggles rather than checkboxes are being
rendered.

gtk.CellRendererToggle.set_radio

def set_radio(radio)

radio :

If True make the toggle look like a radio button

The set_radio() method sets the style
of the toggle button. If radio is
True, the cell renderer renders a radio toggle (i.e. a
toggle in a group of mutually-exclusive toggles). If
False, it renders a check toggle (a standalone boolean
option). This can be set globally for the cell renderer, or changed just
before rendering each cell in the model (for gtk.TreeView, you
set up a per-row setting using gtk.TreeViewColumn
to associate model columns with cell renderer properties).