CheckBox¶
New in version 1.4.0.
CheckBox is a specific two-state button that can be either checked or
unchecked. If the CheckBox is in a Group, it becomes a Radio button.
As with the ToggleButton, only one Radio button
at a time can be selected when the CheckBox.group is set.
An example usage:
from kivy.uix.checkbox import CheckBox
# ...
def on_checkbox_active(checkbox, value):
if value:
print('The checkbox', checkbox, 'is active')
else:
print('The checkbox', checkbox, 'is inactive')
checkbox = CheckBox()
checkbox.bind(active=on_checkbox_active)
- class kivy.uix.checkbox.CheckBox(**kwargs)¶
Bases:
kivy.uix.behaviors.togglebutton.ToggleButtonBehavior,kivy.uix.widget.WidgetCheckBox class, see module documentation for more information.