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.
Properties
Name | Description | Property Type | Scripting | Category |
---|---|---|---|---|
Antialias | Draw with antialias on? Makes text smoother. | boolean | .antialias | Appearance |
Background 3D? | Should this button have a 3d type background, or a flat color one? | boolean | .background3D | Appearance |
Background Color | The background color of the button. | Color | .buttonBG | Appearance |
Border | The border surrounding this component. NOTE that the border is unaffected by rotation. | Border | .border | Common |
Border Painted? | Should the border of this button be displayed? | boolean | .borderPainted | Appearance |
Cursor | The mouse cursor to use when hovering over this component. | int | .cursorCode | Common |
Data Quality | The data quality code for any tag bindings on this component. | int | .dataQuality | Data |
Enabled | If disabled, a component cannot be used. | boolean | .componentEnabled | Common |
Fill Area? | Controls whether or not this button's internal area is filled. | boolean | .contentAreaFilled | Appearance |
Focusable | If 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 | .focusable | Behavior |
Font | Font of text on this component. | Font | .font | Appearance |
Foreground Color | The foreground color of the component. | Color | .foreground | Appearance |
Image Path | The relative path of the image. | String | .path | Appearance |
Label | Text displayed on this button. | String | .text | Appearance |
Margin | The space between a button's text and its borders. | Insets | .margin | Layout |
Mouseover Text | The text that is displayed in the tooltip which pops up on mouseover of this component. | String | .toolTipText | Common |
Name | The name of this component. | String | .name | Common |
Opaque | Set this to false if you want the button to be completely opaque. | boolean | .opaque | Appearance |
Rollover? | If true, the button may indicate that the mouse is hovering over it. | boolean | .rolloverEnabled | Appearance |
Selected | State of this tToggle button. | boolean | .selected | Data |
Selected Image Path | The relative path of the image to be displayed when this component is selected (toggled on). | String | .selectedPath | Appearance |
Styles | Contains the component's styles. | Dataset | .styles | Appearance |
Visible | If disabled, the component will be hidden. | boolean | .visible | Common |
Scripting
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