NxtCol

From BR Wiki
Revision as of 22:57, 22 May 2014 by Laura (talk | contribs)
Jump to navigation Jump to search

The NxtRow, Next, and NxtCol internal functions were introduced in BR! 4.20.

Related functions are Next and NxtRow.

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

The NxtCol internal function identifies the character position or cell column associated with the next cursor position (e.g. where the mouse was last clicked). If the next cursor position is in a 2D control, then NxtCol specifies the column of the cell within the 2D control. If not, it specifies the first character position of the next control to receive focus.

NxtRow specifies the row of the respective position.

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.

CurCol/NxtCol have a slight change in functionality in 4.20 release. Previously they specified the column (relative to the window) of the cursor position. Now they specify the first position of the respective control.

Option 59 has been added to make CurCol (not NxtCol) work the old way.