
45
Class Reference
4.2.2.5
statusText
The
gui.statusText
property is a string that specifies text for display in the status bar at
the top of a OHV300 GUI screen. When
gui.status
is null, the OHV300 displays status
icons in the status bar. Note: The input mode icon will always be displayed in addition to
the status text when an edit control is active.
With menus and forms, use the
caption
property (section 4.2.6.1) to automatically set
gui.statusText
when the menu or form is shown.
4.2.3
Objects
The OHV300 application development environment provides the user classes described in
this section for use in building forms for the OHV300 gui object. The instances of these
classes are referred to as
controls
in this document.
4.2.3.1
gui.Button
The
gui.Button
constructor creates a button control for a GUI form. The
onClick
event
handler is called when the enter key on the OHV300 keypad is pressed and the button
control is active. Program the function to return Boolean
true
if the control’s default
processing of the key should continue. Otherwise, program the function to return
false
;
the control will act as if not clicked.
Format:
var <button_name> =
new gui.Button(text, onClick);
Where:
<button_name>
– program-provided button control.
text
– string; a label for the button. This property can be changed after the object is
created.
onClick
– function for handling the button click event. 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.
Example:
// button control event handler
function rFOnClick(){reader.writeSetting(0x1b, 4);}
function rs232OnClick(){reader.writeSetting(0x1b, 1);}
// create the form object
var myForm = new gui.Form();
// create the button
var rfButton = new gui.Button("RF Comm", RFOnClick);
var rs232Button = new gui.Button("RS232 Comm", RS232OnClick);
Содержание 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...