Gtk.CellRendererToggle¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
Fields¶
- Inherited:
Class Details¶
- class Gtk.CellRendererToggle(**kwargs)¶
- Bases:
- Abstract:
No
Renders a toggle button in a cell
GtkCellRendererToggle
renders a toggle button in a cell. The button is drawn as a radio or a checkbutton, depending on theGtkCellRendererToggle:radio
property. When activated, it emits theGtkCellRendererToggle::toggled
signal.Deprecated since version 4.10: List views use widgets to display their contents. You should use [class`Gtk`.ToggleButton] instead
- classmethod new()[source]¶
- Returns:
the new cell renderer
- Return type:
Creates a new
GtkCellRendererToggle
. Adjust rendering parameters using object properties. Object properties can be set globally (with g_object_set()). Also, withGtkTreeViewColumn
, you can bind a property to a value in aGtkTreeModel
. 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.Deprecated since version 4.10.
- get_activatable()[source]¶
-
Returns whether the cell renderer is activatable. See
Gtk.CellRendererToggle.set_activatable
().Deprecated since version 4.10.
- get_active()[source]¶
-
Returns whether the cell renderer is active. See
Gtk.CellRendererToggle.set_active
().Deprecated since version 4.10.
- get_radio()[source]¶
-
Returns whether we’re rendering radio toggles rather than checkboxes.
Deprecated since version 4.10.
- set_activatable(setting)[source]¶
- Parameters:
setting (
bool
) – the value to set.
Makes the cell renderer activatable.
Deprecated since version 4.10.
- set_active(setting)[source]¶
- Parameters:
setting (
bool
) – the value to set.
Activates or deactivates a cell renderer.
Deprecated since version 4.10.
- 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 (forGtkTreeView
, you set up a per-row setting usingGtkTreeViewColumn
to associate model columns with cell renderer properties).Deprecated since version 4.10.
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 ofGtkTreePath
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:
- Gtk.CellRendererToggle.props.active¶
- Name:
active
- Type:
- Default Value:
- Flags:
- Gtk.CellRendererToggle.props.inconsistent¶
- Name:
inconsistent
- Type:
- Default Value:
- Flags: