
55
Class Reference
Note: The
gui.Text
constructor should be used only to display text, not as a control
within a
gui.Form
or
gui.Menu
.
Example:
gui.statusText = "text example";
gui.show(new gui.Text
("Four score and seven years ago, our fathers brought forth upon
this continent, etc ..."));
displays the screen shown in Figure 13.
Figure 13 – gui.Text Example
Note: The scroll bar indicates that there is more text to display than is currently on the
screen.
4.2.3.12
gui.ToggleButton
The
gui.ToggleButton
constructor defines a button control for a GUI form. When a
toggle button is clicked, an indicator in the button is alternately displayed or suppressed.
Format:
var <togglebutton_name> =
new gui.ToggleButton(text, initiallyChecked, onToggle);
Where:
<togglebutton_name>
– program-provided toggle button control.
text
– string; a label for the toggle button.
initiallyChecked
– Boolean;
true
, the button displays the checked indicator when
first shown;
false
, the button does not display the checked indicator when first shown.
onToggle
– function for handling the button click event. It passes a single Boolean
parameter;
true
, the button is checked;
false
, the button is not checked. The OHV300
calls this function when the operator presses the
OK
enter key on the OHV300 keypad
when the GUI button is the active control.
Other Functionality:
checked
– Boolean; current state of toggle button.
toggle
– function; toggles the toggle button as if activated by the GUI screen.
Содержание OHV300
Страница 1: ...FACTORY AUTOMATION MANUAL JAVASCRIPT PROGRAMMING GUIDE...
Страница 88: ...88 Supported JavaScript Core delete function in instanceof new this typeof void...
Страница 93: ...93 Symbology ID Modifier Information...
Страница 94: ...TDOCT 4981_ENG 11 2015...