
46
Class Reference
// position the controls on the form
myForm.append(rfButton);
myForm.append(rs232Button);
// Place text on the status bar
gui.statusText = "button demo";
// show the form
gui.showForm(myForm);
Displays the form shown in Figure 10.
Figure 10 – Button Demo
When the operator presses the left softkey or the enter key when the control labeled “RF
Comm” is active, the script executes a
reader.writeSettings
method to set the
communications mode setting to RF (Bluetooth). When the “RS232 Comm” control is
active and the operator presses the key, the script executes a
reader.writeSettings
method to set the communications mode setting to RS232.
Note: The active control is highlighted.
4.2.3.2
gui.Edit
The gui.Edit constructor creates an edit control for a GUI form. The OHV300 operator can
enter data into the edit control.
Format:
var <edit_name> =
new gui.Edit(text, defaultInputMode, validInputModes, onChar,
readOnly);
Where:
<edit_name>
– program-provided edit control.
text
– string; the initial value for the edit control. The control contains text when it is first
displayed on the
gui
object. This property can be changed after the object is created.
defaultInputMode
– number; the input mode that is selected when the user navigates
to the edit control and enters data. Modes are defined by
gui.inputMode
(section
Note: The user can change to another input mode using the shift key.
Содержание 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...