
48
Class Reference
For example, if you want the user input to not exceed 100, you could do it as shown below:
var usr_input = "";
var Quantity = new gui.Edit("", gui.inputMode.numeric,
gui.inputMode.numeric, maxValue);
function maxValue(data)
{
usr= data;
if ( parseInt(usr_input) > 99 )
{
reader.beep(3);
Quantity.text = "";
usr_input = "";
return true;
}
return false;
}
The text in each edit control identifies the default input mode of the control and the modes
which are enabled for the shift key.
4.2.3.3
gui.Form
The
gui.Form
constructor creates a
Form
object for the OHV300 GUI. The
gui.Form
constructor defines three event handlers for key events. Event handlers are null if not
specified.
The following controls can be used in a form:
gui.Button
gui.ToggleButton
gui.Edit
gui.Image
gui.Label
gui.Separator
Form controls must be appended (section 4.2.5.1) or prepended (section 4.2.5.2) to the
form object.
Format:
var <form_name> = new gui.Form(onOk, onCancel, onKey);
Содержание 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...