CellRendererToggle#
Deprecated since version 4.10: List views use widgets to display their contents.
You should use ToggleButton
instead
Superclasses: CellRenderer
, InitiallyUnowned
, Object
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 the
GtkCellRendererToggle:radio
property.
When activated, it emits the GtkCellRendererToggle::toggled
signal.
Constructors#
- class CellRendererToggle
- classmethod new() CellRenderer #
Creates a new
GtkCellRendererToggle
. Adjust rendering parameters using object properties. Object properties can be set globally (withset()
). 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: Please do not use it in newly written code
Methods#
- class CellRendererToggle
- get_activatable() bool #
Returns whether the cell renderer is activatable. See
set_activatable()
.Deprecated since version 4.10: Please do not use it in newly written code
- get_active() bool #
Returns whether the cell renderer is active. See
set_active()
.Deprecated since version 4.10: Please do not use it in newly written code
- get_radio() bool #
Returns whether we’re rendering radio toggles rather than checkboxes.
Deprecated since version 4.10: Please do not use it in newly written code
- set_activatable(setting: bool) None #
Makes the cell renderer activatable.
Deprecated since version 4.10: Please do not use it in newly written code
- Parameters:
setting – the value to set.
- set_active(setting: bool) None #
Activates or deactivates a cell renderer.
Deprecated since version 4.10: Please do not use it in newly written code
- Parameters:
setting – the value to set.
- set_radio(radio: bool) None #
If
radio
isTrue
, 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: Please do not use it in newly written code
- Parameters:
radio –
True
to make the toggle look like a radio button