CheckBox

Inherits:Button<BaseButton<Control<CanvasItem<Node<Object

A button that represents a binary choice.

Description

CheckBox allows the user to choose one of only two possible options. It's similar toCheckButton in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to useCheckBox when toggling it hasno immediate effect on something. For example, it could be used when toggling it will only do something once a confirmation button is pressed.

See alsoBaseButton which contains common properties and methods associated with this node.

WhenBaseButton.button_group specifies aButtonGroup,CheckBox changes its appearance to that of a radio button and uses the variousradio_* theme properties.

Properties

HorizontalAlignment

alignment

0 (overridesButton)

bool

toggle_mode

true (overridesBaseButton)

Theme Properties

int

check_v_offset

0

Texture2D

checked

Texture2D

checked_disabled

Texture2D

radio_checked

Texture2D

radio_checked_disabled

Texture2D

radio_unchecked

Texture2D

radio_unchecked_disabled

Texture2D

unchecked

Texture2D

unchecked_disabled


Theme Property Descriptions

intcheck_v_offset =0🔗

The vertical offset used when rendering the check icons (in pixels).


Texture2Dchecked🔗

The check icon to display when theCheckBox is checked.


Texture2Dchecked_disabled🔗

The check icon to display when theCheckBox is checked and is disabled.


Texture2Dradio_checked🔗

The check icon to display when theCheckBox is configured as a radio button and is checked.


Texture2Dradio_checked_disabled🔗

The check icon to display when theCheckBox is configured as a radio button, is disabled, and is unchecked.


Texture2Dradio_unchecked🔗

The check icon to display when theCheckBox is configured as a radio button and is unchecked.


Texture2Dradio_unchecked_disabled🔗

The check icon to display when theCheckBox is configured as a radio button, is disabled, and is unchecked.


Texture2Dunchecked🔗

The check icon to display when theCheckBox is unchecked.


Texture2Dunchecked_disabled🔗

The check icon to display when theCheckBox is unchecked and is disabled.


User-contributed notes

Please read theUser-contributed notes policy before submitting a comment.