GML::MODE - Set Grid to Read-Only Mode

Syntax

CALL "GML::MODE"

Description

This procedure changes a main grid to a "read only" mode. The value of GML_TPL.OPTION% determines the grid mode. A value of 0 indicates a normal mode with grid cell editing status determined by the value of GML_TPL.E_MODE%[c] for each individual cell. A GML_TPL.OPTION% value of 1 places the grid in a read only mode while temporarily overriding the value of the GML_TPL.E_MODE%[c] variables for the cells. This procedure is valid only when applied to the main grid (GML_TPL.MEMBER%=1).

Options

The MODE procedure normally redraws the grid. Setting GML_TPL.DEF_FLAG% to a value of 1 will prevent the procedure from performing the redraw operation.

Example 1

The main grid in grid set one is set to a read only mode.

2400 GML.SET%=1
2410 CALL "GML::TPL_PREP"
2420 GML_TPL.OPTION%=1
2430 CALL "GML::MODE"

Example 2

The main grid in grid set two is set to a read only mode and the grid text and background colors are also changed for all cells in the main grid.

2400 GML.SET%=2
2410 CALL "GML::TPL_PREP"
2420 GML_TPL.OPTION%=1
2430 GML_TPL.COL_N%=-1
2440 GML_TPL.ROW_N%=-1
2450 GML_TPL.T_COLOR$[1]=GML.DKGRAY$
2460 GML_TPL.B_COLOR$[1]=GML.LTGRAY$
2470 CALL "GML::MODE"

See Also

Visual PRO/5 Grid Management Library

Alphabetical Listing of GML Procedures