button
Display a button. One or more ogScript tasks can be attached to a button to be fired when the button is pressed or toggled.
Syntax
<button name="label-name" attributes> </button>
Attributes
Attribute |
Values |
Restrictions |
Description |
name |
String |
Required |
The text to display in the label. |
buttontype |
push toggle checkbox radio |
|
The type of button to create. Push buttons are stateless. Toggle, checkbox, and radio are all 2-sate “on” and “off”. |
toggled |
true false |
|
The initial state of the button. |
flat |
true false |
Only applicable to push or toggle buttontype |
Request a ‘flat’ look for the button (or toggle button) in the UI. Note that icons styles may not be applied to flat buttons. |
Default values shown in bold.
Examples
This example displays a series of simple pushbuttons as illustrated in Figure 71:
<button buttontype="push" name="push" top="25" width="80"/>
<button buttontype="toggle" name="toggle" toggled="true" top="25" width="80"/>
<button buttontype="push" flat="true" left="400" name="flat" top="25" width="80"/>
<button buttontype="radio" left="500" name="radio" top="25"/>
<button buttontype="checkbox" left="600" name="checkbox" top="25"/>
Figure 71 – Button Examples