Previous Topic: Determine the Field Location of the Cursor

Next Topic: Cursor Positioning Hierarchy

Control Cursor Positioning

The cursor position on a panel is controlled either implicitly by Panel Services (for example, to identify a field in error), or by an explicit request from the procedure issuing the panel.

For explicit cursor positioning, use the #OPT statement CURSOR operand. Either specify the name of an input field defined on the panel, or supply screen coordinates as a row and column number.

Note: If the row and column coordinates that you specify lie outside the boundaries of the current operating window, the cursor is positioned on row 1, column 1 of the window.

A procedure can also influence the implicit positioning of the cursor by Panel Services. Use the &ASSIGN SETERR operand to let the procedure identify one or more fields which can be classified as being in error.

Alternatively, a procedure can use the #OPT panel statement ERRFLD operand to identify a particular field which is in error.