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​
Property | Description | Property Type | Scripting | Category |
---|---|---|---|---|
Background Color | The 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 | .buttonBG | Appearance |
Border | The 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 | .border | Common |
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 | .borderPainted | Appearance |
Cursor | The mouse cursor to use when hovering over this component. Options are: Default, Crosshair, Text, Wait, Hand, Move, SW Resize, or SE Resize. | int | .cursorCode | Common |
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. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector. | 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 |
Quality | The data quality code for any Tag bindings on this component. | QualityCode | .quality | Data |
Rollover? | If true, the button may indicate that the mouse is hovering over it. | boolean | .rolloverEnabled | Appearance |
Selected | State of this toggle 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 |
Deprecated Properties​
Property | Description | Property Type | Scripting | Category |
---|---|---|---|---|
Data Quality | The data quality code for any Tag bindings on this component. | int | .dataQuality | Deprecated |
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