Debian Codegraph @

docs/tutorials/gtk4/controls/check-radio-buttons.rst

raw
1 Check & Radio Buttons
2 =====================
3 A :class:`Gtk.CheckButton` places a label next to an indicator.
4 Check or Radio buttons are created through :class:`Gtk.CheckButton`, you create
5 one or another depending grouping.
6
7 :class:`Gtk.CheckButton` can be grouped together, to form mutually exclusive
8 groups so only one of the buttons can be toggled at a time, this create what we
9 usually refer to as a radio button.
10
11 In addition to "on" and "off", :class:`Gtk.CheckButton` can be an "in between"
12 state that is neither on nor off. This can be used e.g. when the user has
13 selected a range of elements (such as some text or spreadsheet cells) that are
14 affected by a check button, and the current values in that range are
15 inconsistent.
16 For this purpose use :attr:`Gtk.CheckButton.props.inconsistent`.
17
18 Example
19 -------
20
21 .. image:: images/check_radio_buttons.png
22
23 .. literalinclude:: examples/check_radio_buttons.py
24 :linenos: