Top  | Previous | Next

Toggle Button

The two states of a<br>
toggle button

The two states of a
toggle button

Description

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

Appearance

Font

Font of text of this component

Scripting name

font

Data type

Font

Foreground Color

The foreground color of the component.

Scripting name

foreground

Data type

Color

Background Color

The background color for the button.

Scripting name

buttonBG

Data type

Color

Background 3D?

Should this button have a 3d type background, or a flat color one?

Scripting name

background3D

Data type

boolean

Flags

expert

Opaque

Set this to false if you want the button to be completely opaque.

Scripting name

opaque

Data type

boolean

Flags

expert

Fill Area?

Controls whether or not this button's internal area is filled

Scripting name

contentAreaFilled

Data type

boolean

Flags

expert

Border Painted?

Should the border of this button be displayed?

Scripting name

borderPainted

Data type

boolean

Flags

expert

Rollover?

If true, the button may indicate that the mouse is hovering over it.

Scripting name

rolloverEnabled

Data type

boolean

Flags

expert

Label

Text displayed on this button.

Scripting name

text

Data type

String

Flags

bindable

Image Path

The relative path of the image.

Scripting name

path

Data type

String

Flags

bindable

Selected Image Path

The relative path of the image to be displayed when this component is selected (toggled on).

Scripting name

selectedPath

Data type

String

Antialias

Draw with antialias on? Makes text smoother

Scripting name

antialias

Data type

boolean

Flags

expert

Styles

Contains the component's styles

Scripting name

styles

Data type

Dataset

Flags

bindable | expert

Behavior

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.

Scripting name

focusable

Data type

boolean

Flags

expert

Common

Name

The name of this component.

Scripting name

name

Data type

String

Flags

bindable

Enabled

If disabled, a component cannot be used.

Scripting name

componentEnabled

Data type

boolean

Visible

If disabled, the component will be hidden.

Scripting name

visible

Data type

boolean

Flags

bindable

Border

The border surrounding this component. NOTE that the border is unaffected by rotation.

Scripting name

border

Data type

Border

Mouseover Text

The text that is displayed in the tooltip which pops up on mouseover of this component.

Scripting name

toolTipText

Data type

String

Cursor

The mouse cursor to use when hovering over this component.

Scripting name

cursorCode

Data type

int

Values

0

Default

1

Crosshair

2

Text

3

Wait

12

Hand

13

Move

4

SW Resize

5

SE Resize

6

NW Resize

7

NE Resize

8

N Resize

9

S Resize

10

W Resize

11

E Resize

Data

Selected

State of this tToggle button.

Scripting name

selected

Data type

boolean

Flags

bindable

Data Quality

The data quality code for any tag bindings on this component.

Scripting name

dataQuality

Data type

int

Flags

bindable | expert

Layout

Margin

The space between a button's text and its borders.

Scripting name

margin

Data type

Insets

Flags

expert

Scripting

Events

The following event sets are fired by this component. See Component Event Handlers to learn more.

mouse
item
mouseMotion
focus
action
propertyChange
key

 

Scripting Functions

This component has no special scripting functions.