GML::SET_ROWS - Set Number of Empty Rows to be Displayed after Last Populated Row

Syntax

CALL "GML::SET_ROWS"

Description

This procedure sets the number of rows that can be viewed beyond the last grid row that contains text, and minimum number of visible rows to display. The GML_TPL$ template variable GML_TPL.ROW_N% is used to designate the number of rows that can be viewed beyond the last grid row that contains text. The value of this variable must be in the range of –1 to the maximum number of rows specified when the grid was created. Specifying a value of –1 indicates that the maximum rows to be viewed beyond the last row that contains text is equal to the actual rows in the grid. This procedure is valid only when applied to the main grid (GML_TPL.MEMBER%=1).

Options

Setting GML_TPL.OPTION% to 1 prior to executing the SET_ROWS procedure will set the minimum number of visible rows to display. Setting the value of the GML_TPL.ROW_N% variable to –1 indicates that the minimum number of rows to be viewed is equal to the number of visible rows that can be displayed in the grid control. Conversely, setting the GML_TPL.ROW_N% to a value of 1 will cause the grid to display only 1 grid line when the first row of the grid is empty.

Setting variable GML_TPL.OPTION% to 2 will apply the value in GML_TPL.ROW_N% to both the amount of rows to be viewed beyond the last row containing text, and to the minimum amount of visible rows to display. A GML_TPL.OPTION% of 2 is equivalent to executing the SET_ROWS procedure with an option of 0, and then an option of 1.

Example

In this example the grid display will show 1 row beyond the last row in the grid that contains text. If the last row in the grid containing text is row number 15, then the maximum rows that can be viewed is 16.

2400 GML.SET%=1
2410 CALL "GML::TPL_PREP"
2420 GML_TPL.ROW_N%=1
2430 CALL "GML::SET_ROWS"

See Also

Visual PRO/5 Grid Management Library

Alphabetical Listing of GML Procedures