Determining the Current Position in a Scrollable Region

To determine the data row and data column of the current field in the scrollable region, call the scrollable region current position function, sr_curpos():

void sr_curpos(&row, &col, srp)
 
int *row;
/*Pointer to variable for current
*/
 
/*data row
*/
int *col;
/*Pointer to variable for current
*/
 
/*data column
*/
SRPTR srp;
/*Scrollable region being processed
*/

This function places the value of the current data row and data column in the scrollable region in the variables passed to the function.

Alternatively, you can use sr_currow() and sr_curcol(), which return the value of the current data row and current data column, respectively. The calls for these functions are as follows:

int sr_currow(srp)
 
SRPTR srp;

int sr_curcol(srp)
/* Scrollable region being processed
*/
SRPTR srp;
/* Scrollable region being processed
*/


Home Contents Previous Next