Returns or sets how the object responds to user input.
Object.Mode [ = enASwitchMode ]
The Mode property syntax has the following parts:
Name |
Type |
Description |
Object |
ASwitch |
ASwitch control |
enASwitchMode |
enumASwitchMode |
An integer specifying how the switch responds to user input (ignores, switch when pressed, or switch until released). This property can be set at design time and is read-only at run time. |
enumASwitchMode can be one of the following:
Name |
Value |
Description |
aswtModeIndicator |
0 * |
Indicator. The switch does not respond to user input. In this mode, the value of the switch can only be changed programmatically. |
aswtModeSwitchWhenPressed |
1 |
Switch when pressed. When the mouse is clicked on the switch, the value changes and remains until the switch is clicked again. |
aswtModeSwitchUntilReleased |
2 |
Switch until released. When the mouse is clicked on the switch, the value changes. When the mouse button is released, the value of the switch changes back to its original state. |
The following statement changes the ASwitch Mode to be switched when pressed:
sw1.Mode=aswtModeSwitchWhenPressed