Deleting and Inserting Rows in a Scrollable Region

Functions are provided to delete and insert a row in a scrollable region. These functions can be called only while the form is displayed on the screen.

To delete a row in a scrollable region, call the scrollable region row delete function, sr_rowdel():

int sr_rowdel(data_row, srp)
 
int data_row;
/* Data row to delete
*/
SRPTR srp;
/* Scrollable region on displayed form
*/

When the data row is deleted, the contents of all rows below the deleted row are moved up one row.

To insert a row in a scrollable region, call the scrollable region row insert function, sr_rowins():

int sr_rowins(data_row, srp)
int data_row;
/* Data row to insert blank row after
*/
SRPTR srp;
/* Scrollable region on displayed form
*/

This function inserts a row into the scrollable region by moving the contents of all rows below the row in the call down one row. Then the data variables for the inserted row are initialized to 0; string variables are reset to a blank string.


Home Contents Previous Next