
47
Class Reference
validInputModes
– number; a bitwise combination of input modes as defined by
gui.inputMode
(section 4.2.2.1); defines the input modes that are valid in the edit
control.
onChar
– function; the function to run when a character is entered into an edit control.
readOnly
– Boolean; false allows the text to be changed by the user, true prevents the
text from being changed.
Example:
function quit() { reader.runScript(".default.js"); }
var form = new gui.Form(null, quit);
form.Caption = "Input Modes";
form.append(new gui.Edit("Num, any",
gui.inputMode.numeric));
form.append(new gui.Edit("CAP, any",
gui.inputMode.caps));
form.append(new gui.Edit("Num, only",
gui.inputMode.numeric,
gui.inputMode.numeric));
form.append(new gui.Edit("CAP, U/l Case",
gui.inputMode.caps,
gui.inputMode.caps
| gui.inputMode.lowerCase));
gui.showForm(form);
Displays the form shown in Figure 11.
Figure 11 -- Input Modes Example
Example: The following example shows how to use onChar property of the Edit control.
The onChar property specifies a function which will run every time a character is entered.
The function returns either TRUE or FALSE. The user input is appended to the edit control
ONLY if the specified function returns FALSE.
Содержание 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...