Skip to main content
Version: 2027.02 Beta
View as Markdown

Perspective - Checkbox

Component Palette Icon:

Description​

A Checkbox is a familiar component that represents a bit - it is either on (selected) or off (not selected). In addition, the 'triState' property can be enabled, adding a third state to represent an indeterminate value. It is functionally equivalent to the Toggle Switch component.

The DateTime Picker component has two pre-configured variants: Text Right and Text left.

Properties​

Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.

NameDescriptionProperty Type
selectedOutput value for checkbox.value: boolean
textLabel for the checkbox. Label text can also be entered directly by deep selecting the checkbox component, which enables inline editing. Changes are immediately reflected in the text property field.value: string
textPositionWhere to place the label text in relation to the checkbox: top, right, bottom, or left.value: string
enabledWhether the user can currently interact with the checkbox.

Note: If the component is disabled, scripts can still run on the component. For example, if you add a script action to the onClick event, the script will fire when the user clicks on the Checkbox.
value: boolean
triStateWhether the checkbox supports a third state of "indeterminate" - effectively 'null' or 'no choice'.value: boolean
checkedIconSettings for the appearance of the check box's icon when it is selected (checked).
  • path: Path to the icon source, in format: library/IconName. For more information on icons, see the Images, and Icons in Perspective page. Value is string.
  • color: Settings for the fill color for the icon.
    • enabled: Color of the icon when enabled. Can be a named color. Value is string.
    • disabled: Color of the icon when disabled. Can be a named color. Value is string.
  • style: Sets a style for the icon. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.
object
uncheckedIconSettings for the appearance of the check box's icon when it is not selected.
  • path: Path to the icon source, in format: library/IconName. For more information on icons, see the Images, and Icons in Perspective page. Value is string.
  • color: Settings for the fill color for the icon.
    • enabled: Color of the icon when enabled. Can be a named color. Value is string.
    • disabled: Color of the icon when disabled. Can be a named color. Value is string.
  • style: Sets a style for the icon. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.
object
indeterminateIconSettings for the appearance of the check box's icon when it is in the indeterminate state. Only applies if props.triState is set to true.
  • path: Path to the icon source, in format: library/IconName. For more information on icons, see the Images, and Icons in Perspective page. Value is string.
  • color: Settings for the fill color for the icon.
    • enabled: Color of the icon when enabled. Can be a named color. Value is string.
    • disabled: Color of the icon when disabled. Can be a named color. Value is string.
  • style: Sets a style for the icon. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.
object
styleSets a style for this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object

Component Scripts and Events​

Further component interaction and functionality can be configured for all components through scripting and event actions. Right-click on the component or select Components from the Designer menubar to access the configuration popups for both of these options:

  • Configure Events: Accesses the Event Configuration popup where you can configure actions to run in response to events to make the component dynamic. The Events Configurations page shows how to configure events and actions on a Perspective component.

  • Configure Scripts: Accesses the Script Configuration popup where custom methods and message handlers can be added. The Scripting in Perspective section details scripting fundamentals, creating custom methods, and using message handlers.

Examples​

Example 1​

PropertyValue
props.textCheckbox 1
props.textPositionleft
props.triStatetrue

Example 2​

PropertyValue
props.textCheckbox 2
props.textPositionleft
props.selectednull

Example 3​

PropertyValue
props.textCheckbox 3
props.textPositiontop
props.enabledfalse
props.selectedfalse