Skip to main content
Version: 8.1

Vision - Toggle Button

Component Palette Icon

The Toggle button represents a bit: on (selected) or off (not selected). Visually the button looks down or depressed when it is selected, and up when it is not selected. Logically, this component is very similar to the Check Box component.

note

For implementing a controls screen, the 2 State Toggle is usually more appropriate than this component.

Properties​

PropertyDescriptionProperty TypeScriptingCategory
Background ColorThe background color of the button. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.Color.buttonBGAppearance
BorderThe border surrounding this component. Options are No border, Etched (Lowered), Etched (Raised), Bevel (Lowered), Bevel (Raised), Bevel (Double), and Field Border.
Note: The border is unaffected by rotation.

Changed in 8.1.21
As of 8.1.21, the "Button Border" and "Other Border" options are removed.
Border.borderCommon
Border Painted?Indicates if the border of this button should be displayed.
Changed in 8.1.8
This property was removed in 8.1.8
boolean.borderPaintedAppearance
CursorThe mouse cursor to use when hovering over this component. Options are: Default, Crosshair, Text, Wait, Hand, Move, SW Resize, or SE Resize.int.cursorCodeCommon
EnabledIf disabled, a component cannot be used.boolean.componentEnabledCommon
Fill Area?Controls whether or not this button's internal area is filled.boolean.contentAreaFilledAppearance
FocusableIf a button is not focusable, you will not be able to interact with it with the keyboard. This means you can't "tab" over to it.boolean.focusableBehavior
FontFont of text on this component.Font.fontAppearance
Foreground ColorThe foreground color of the component. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.Color.foregroundAppearance
Image PathThe relative path of the image.String.pathAppearance
LabelText displayed on this button.String.textAppearance
MarginThe space between a button's text and its borders.Insets.marginLayout
Mouseover TextThe text that is displayed in the tooltip which pops up on mouseover of this component.String.toolTipTextCommon
NameThe name of this component.String.nameCommon
OpaqueSet this to false if you want the button to be completely opaque.boolean.opaqueAppearance
QualityThe data quality code for any Tag bindings on this component.QualityCode.qualityData
Rollover?If true, the button may indicate that the mouse is hovering over it.boolean.rolloverEnabledAppearance
SelectedState of this toggle button.boolean.selectedData
Selected Image PathThe relative path of the image to be displayed when this component is selected (toggled on).String.selectedPathAppearance
StylesContains the component's styles.Dataset.stylesAppearance
VisibleIf disabled, the component will be hidden.boolean.visibleCommon

Deprecated Properties​

PropertyDescriptionProperty TypeScriptingCategory
Data QualityThe data quality code for any Tag bindings on this component.int.dataQualityDeprecated

Scripting​

Component Functions​

This component does not have component functions associated with it.

Extension Functions​

This component does not have extension functions associated with it.

Event Handlers​

Event handlers allow you to run a script based off specific triggers. See the full list of available event handlers on the Component Events page

Customizers​

Examples​