FOCUS system handle
- Last Updated: July 20, 2021
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
A handle to the field-level widget that is the current field.
Syntax
|
- attribute
- An attribute of the widget that has current input focus.
Attributes
The specific attributes available depend on the type of the widget. You can determine the widget type by examining the FOCUS:TYPE attribute.
Example
The following example uses the FOCUS handle to provide helpful information to the user. The procedure displays an interface that contains several different types of widgets. If you type ?, the procedure displays a message specifying the type of widget that has focus and whether VALUE-CHANGED event is a valid event for that widget.
r-focus.p
|
Note that this example prevents you from entering the question mark character (?) in any field. This does not cause a problem in r-focus.p because a question mark is not a valid input character for any field in the interface.
Notes
- A typical use of the FOCUS handle identifies the widget that contains the current text selection for reference by the system clipboard. For an example of this usage, see OpenEdge Programming Interfaces.
- Within a WAIT-FOR statement, you can specify the field that receives initial input focus.
- You must give input focus to any fill-in widget where you want to set the AUTO-ZAP attribute. For more information, see the SAX-reader object handle reference entry.