Gtk.CheckButton

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Actionable Gtk.Actionable GObject.GInterface->Gtk.Actionable Gtk.Activatable Gtk.Activatable GObject.GInterface->Gtk.Activatable Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Button Gtk.Button Gtk.Actionable->Gtk.Button Gtk.Activatable->Gtk.Button Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.Button Gtk.Buildable->Gtk.Widget Gtk.ToggleButton Gtk.ToggleButton Gtk.Button->Gtk.ToggleButton Gtk.CheckButton Gtk.CheckButton Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.ToggleButton->Gtk.CheckButton Gtk.Widget->Gtk.Container

Example

../_images/CheckButton.png
Subclasses:

Gtk.RadioButton

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

new ()

class

new_with_label (label)

class

new_with_mnemonic (label)

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)

do_draw_indicator (cr)

Properties

Inherited:

Gtk.ToggleButton (3), Gtk.Button (9), Gtk.Container (3), Gtk.Widget (39), Gtk.Actionable (2), Gtk.Activatable (2)

Style Properties

Inherited:

Gtk.Button (7), Gtk.Widget (17)

Name

Type

Default

Flags

Short Description

indicator-size

int

16

d/r

Size of check or radio indicator deprecated

indicator-spacing

int

2

d/r

Spacing around check or radio indicator deprecated

Signals

Inherited:

Gtk.ToggleButton (1), Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.ToggleButton (1), Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

toggle_button

Gtk.ToggleButton

r

Class Details

class Gtk.CheckButton(*args, **kwargs)
Bases:

Gtk.ToggleButton

Abstract:

No

Structure:

Gtk.CheckButtonClass

A Gtk.CheckButton places a discrete Gtk.ToggleButton next to a widget, (usually a Gtk.Label). See the section on Gtk.ToggleButton widgets for more information about toggle/check buttons.

The important signal ( Gtk.ToggleButton ::toggled ) is also inherited from Gtk.ToggleButton.

CSS nodes
checkbutton
├── check
╰── <child>

A Gtk.CheckButton with indicator (see Gtk.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:

Gtk.Widget

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:

Gtk.Widget

Creates a new Gtk.CheckButton with a Gtk.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:

Gtk.Widget

Creates a new Gtk.CheckButton containing a label. The label will be created using Gtk.Label.new_with_mnemonic(), so underscores in label indicate the mnemonic for the check button.

do_draw_indicator(cr) virtual
Parameters:

cr (cairo.Context) –