Next (internal function)

From BR Wiki
Jump to: navigation, search

The Next internal function can be used with Input Fields to move the cursor to the next available field.

Next internal function was introduced in BR! 4.20.

The keyword Next can be used in the same manner as CUR in that the next cursor position within a 2D control can be identified.

00100 INPUT FIELDS "row,col,GRID 10/60, SUB, NEXT, NOWAIT": next_pos

Related functions are NXTROW and NXTCOL.

With respect to these functions, the next cursor position can be the result of keyboard or mouse activity. If the next position results from keyboard activity, then NxtRow has the same value as CurRow when Enter is pressed or control was returned in response to a leading attribute such as X (return control upon exit). When the mouse is used to return control to a program, the next cursor position is the pointer location that is double clicked or hot location that is single clicked.

One key concept here is that just as one must keep track of what type of control was last accessed, by means other than CurRow and CurCol, similarly **one must determine the type of control to be next accessed by means other than NxtRow and NxtCol**. This can be done with the system function NxtFld plus hotkey event (fkey) numbers.