Gtk.CheckButton¶
Example¶
- Subclasses:
Methods¶
- Inherited:
Gtk.ToggleButton (10), Gtk.Button (29), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Actionable (5), Gtk.Activatable (6)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
class |
|
class |
|
Virtual Methods¶
- Inherited:
Gtk.ToggleButton (1), Gtk.Button (6), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Actionable (4), Gtk.Activatable (2)
|
Properties¶
Style Properties¶
- Inherited:
Name |
Type |
Default |
Flags |
Short Description |
---|---|---|---|---|
|
|
d/r |
Size of check or radio indicator |
|
|
|
d/r |
Spacing around check or radio indicator |
Signals¶
Fields¶
- Inherited:
Gtk.ToggleButton (1), Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Type |
Access |
Description |
---|---|---|---|
toggle_button |
r |
Class Details¶
- class Gtk.CheckButton(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
Gtk.CheckButton
places a discreteGtk.ToggleButton
next to a widget, (usually aGtk.Label
). See the section onGtk.ToggleButton
widgets for more information about toggle/check buttons.The important signal (
Gtk.ToggleButton
::toggled
) is also inherited fromGtk.ToggleButton
.- CSS nodes
checkbutton ├── check ╰── <child>
A
Gtk.CheckButton
with indicator (seeGtk.ToggleButton.set_mode
()) has a main CSS node with name checkbutton and a subnode with name check.button.check ├── check ╰── <child>
A
Gtk.CheckButton
without indicator changes the name of its main node to button and adds a .check style class to it. The subnode is invisible in this case.- classmethod new()[source]¶
- Returns:
a
Gtk.Widget
.- Return type:
Creates a new
Gtk.CheckButton
.
- classmethod new_with_label(label)[source]¶
- Parameters:
label (
str
) – the text for the check button.- Returns:
a
Gtk.Widget
.- Return type:
Creates a new
Gtk.CheckButton
with aGtk.Label
to the right of it.
- classmethod new_with_mnemonic(label)[source]¶
- Parameters:
label (
str
) – The text of the button, with an underscore in front of the mnemonic character- Returns:
a new
Gtk.CheckButton
- Return type:
Creates a new
Gtk.CheckButton
containing a label. The label will be created usingGtk.Label.new_with_mnemonic
(), so underscores in label indicate the mnemonic for the check button.
- do_draw_indicator(cr) virtual¶
- Parameters:
cr (
cairo.Context
) –