gtk.CellRendererTogglean object that renders a toggle button into a TreeView
cellSynopsisgtk.CellRendererTogglegtk.CellRenderergtk.CellRendererToggleget_radioset_radioradioget_activeset_activesettingget_activatableset_activatablesettingAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.CellRenderer
+-- gtk.CellRendererToggle
gtk.CellRendererToggle Propertiesgtk.Object Propertiesgtk.CellRenderer Properties
"activatable"Read/WriteIf True, the toggle button can be activated"active"Read/WriteIf True, the button is active."inconsistent"Read/WriteIf True, the button is in an inconsistent state. GTK+ 2.2 and above."indicator-size"Read-WriteSize of check or radio indicator. Allowed values: >= 0. Default value: 12."radio"Read/WriteIf True, draw the toggle button as a radio button
gtk.CellRendererToggle Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.CellRenderer Signal Prototypes"toggled"callbackcellrenderertogglepathuser_param1...DescriptionThe 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.Constructorgtk.CellRendererToggleReturns :the new cell rendererCreates 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.Methodsgtk.CellRendererToggle.get_radioget_radioReturns :True if we're rendering radio toggles rather than checkboxesThe get_radio() method returns
True if radio toggles rather than checkboxes are being
rendered.gtk.CellRendererToggle.set_radioset_radioradioradio :If True make the toggle look like a radio buttonThe 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).gtk.CellRendererToggle.get_activeget_activeReturns :True if the cell renderer is active.The get_active() method returns
True if the cell renderer is active. See gtk.CellRendererToggle.set_active().gtk.CellRendererToggle.set_activeset_activesettingsetting :the value to set.The set_active() method activates a
cell renderer if setting is True
and or deactivates a cell renderer if setting is
False.gtk.CellRendererToggle.get_activatableget_activatableReturns :True if the cell renderer is activatable.This method is available in PyGTK 2.22 and above.The get_activatable() method returns
True if the cell renderer is activatable.gtk.CellRendererToggle.set_activatableset_activatablesettingsetting :the value to set.This method is available in PyGTK 2.22 and above.The set_activatable() method sets wether
the cell renderer is activatable.SignalsThe "toggled" gtk.CellRendererToggle Signalcallbackcellrenderertogglepathuser_param1...cellrenderertoggle :the cellrenderertoggle that received the "toggled" signalpath :the path of the cellrenderertoggle represented as a stringuser_param1 :the first user parameter (if any) specified with the connect() method... :additional user parameters (if any)The "toggled" signal is emitted when the toggle button in the
cell changes state.