
54
Class Reference
Example:
function leftSoftkeyOnClick()
{
/* processing code */
}
function rightSoftkeyOnClick()
{
/* processing code */
}
var left = new gui.Softkey("Ok", leftSoftkeyOnClick);
var right =
new gui.Softkey("Cancel", rightSoftkeyOnClick);
gui.leftSoftkey = left;
gui.rightSoftkey = right;
4.2.3.11
gui.Text
The
gui.Text
constructor creates a text object that can be displayed in the OHV300 GUI
display area. Text length can exceed the capacity of the display area. The
Text
control
includes a scroll bar to indicate relative position within the text when the operator presses
the up and down arrow keys.
Format:
var <text_name> =
new gui.Text(text, onOk, onCancel, onKey);
Where:
<text_name>
– program-provided text control.
text
– string; text data to display on the OHV300 GUI. To display multi-line text, insert the
new-line character (“\n”) in the text string. This property can be changed after the object is
created.
onOk
– function for handling the enter key. The OHV300 calls this function when the
operator presses the enter key on the OHV300 keypad.
onCancel
– function for handling the
CLEAR
key. The OHV300 calls this function when
the operator presses the
CLEAR
key on the OHV300 keypad. This function also is called
when the escape key is issued (typically by a softkey).
onKey
– function for handling any key, soft or real, not consumed by the active control
(section 4.2.6.2).
Содержание 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...