Gtk.CellRendererToggle¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
The toggle button can be activated |
||
r/w/en |
The toggle state of the button |
||
r/w/en |
The inconsistent state of the button |
||
d/r/w/en |
Size of check or radio indicator |
||
r/w/en |
Draw the toggle button as a radio button |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Gtk.CellRendererToggle(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Gtk.CellRendererToggle
renders a toggle button in a cell. The button is drawn as a radio or a checkbutton, depending on theGtk.CellRendererToggle
:radio
property. When activated, it emits theGtk.CellRendererToggle
::toggled
signal.- classmethod new()[source]¶
- Returns:
the new cell renderer
- Return type:
Creates a new
Gtk.CellRendererToggle
. Adjust rendering parameters using object properties. Object properties can be set globally (with g_object_set()). Also, withGtk.TreeViewColumn
, you can bind a property to a value in aGtk.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.
- get_activatable()[source]¶
-
Returns whether the cell renderer is activatable. See
Gtk.CellRendererToggle.set_activatable
().New in version 2.18.
- get_active()[source]¶
-
Returns whether the cell renderer is active. See
Gtk.CellRendererToggle.set_active
().
- set_activatable(setting)[source]¶
- Parameters:
setting (
bool
) – the value to set.
Makes the cell renderer activatable.
New in version 2.18.
- set_active(setting)[source]¶
- Parameters:
setting (
bool
) – the value to set.
Activates or deactivates a cell renderer.
- set_radio(radio)[source]¶
-
If radio is
True
, the cell renderer renders a radio toggle (i.e. a toggle in a group of mutually-exclusive toggles). IfFalse
, 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 (forGtk.TreeView
, you set up a per-row setting usingGtk.TreeViewColumn
to associate model columns with cell renderer properties).
Signal Details¶
- Gtk.CellRendererToggle.signals.toggled(cell_renderer_toggle, path)¶
- Signal Name:
toggled
- Flags:
- Parameters:
cell_renderer_toggle (
Gtk.CellRendererToggle
) – The object which received the signalpath (
str
) – string representation ofGtk.TreePath
describing the event location
The
::toggled
signal is emitted when the cell is toggled.It is the responsibility of the application to update the model with the correct value to store at path. Often this is simply the opposite of the value currently stored at path.
Property Details¶
- Gtk.CellRendererToggle.props.activatable¶
- Name:
activatable
- Type:
- Default Value:
- Flags:
The toggle button can be activated
- Gtk.CellRendererToggle.props.active¶
- Name:
active
- Type:
- Default Value:
- Flags:
The toggle state of the button
- Gtk.CellRendererToggle.props.inconsistent¶
- Name:
inconsistent
- Type:
- Default Value:
- Flags:
The inconsistent state of the button
- Gtk.CellRendererToggle.props.indicator_size¶
- Name:
indicator-size
- Type:
- Default Value:
0
- Flags:
Size of check or radio indicator
Deprecated since version ???.