GML::SET_OUT_MASK - Set Column Output Mask

Syntax

CALL "GML::SET_OUT_MASK"

Description

This procedure sets the column output mask used to display data in a grid. A mask, conforming to the format outlined for the VPRO/5 STR( ) function, is placed into GML_TPL$ template variable GML_TPL.MASK%[c]. If miscellaneous manipulation of string data is required when applying the mask, then the corresponding GML_TPL.STYLE%[c] variable must be loaded with a value that is the same as used with the CVS( ) string conversion function.

If an error is encountered with the mask during grid redraw activities, then the data for the cell will be displayed without the use of the mask. When a mask contains a zero character (decimal 48) the data in the grid cell is converted to a numeric before applying the mask, and then string manipulation is performed with the CVS() function if variable GML_TPL.STYLE%[c] contains a value greater than 0.

Setting GML_TPL.COL_N% to –1 instructs the GML to apply the mask and value contained in the template variables GML_TPL.MASK$[1] and GML_TPL.STYLE%[1] to all columns in the grid. Setting a GML_TPL.MASK%[c] variable to null ("") will remove an existing mask.

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_OUT_MASK procedure will redraw the grid with the updated mask values.

Example

Output mask for column 5 in grid set 2 is set to "###,##0,00" and the corresponding string manipulation value is set to 1 (strip leading spaces) .

2400 GML.SET%=2
2410 CALL "GML::TPL_PREP"
2420 GML_TPL.MASK$[5]= "###,##0,00"
2430 GML_TPL.STYLE%[5]=1
2440 CALL "GML::SET_OUT_MASK"

See Also

Visual PRO/5 Grid Management Library

Alphabetical Listing of GML Procedures