Skip to main content
Version: 7.9

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 that for implementing a controls screen, the 2 State Toggle is usually more appropriate than this component.


NameDescriptionProperty TypeScriptingCategory
AntialiasDraw with antialias on? Makes text smoother.boolean.antialiasAppearance
Background 3D?Should this button have a 3d type background, or a flat color one?boolean.background3DAppearance
Background ColorThe background color of the button.Color.buttonBGAppearance
BorderThe border surrounding this component. NOTE that the border is unaffected by rotation.Border.borderCommon
Border Painted?Should the border of this button be displayed?boolean.borderPaintedAppearance
CursorThe mouse cursor to use when hovering over this
Data QualityThe data quality code for any tag bindings on this
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.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
Rollover?If true, the button may indicate that the mouse is hovering over it.boolean.rolloverEnabledAppearance
SelectedState of this tToggle 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


Scripting Functions

This component does not have scripting 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