GML::POPULATE- Insert Grid Text Information into Cell

Syntax

CALL "GML::POPULATE"

Description

This procedure places text information into a main grid cell as if it was entered directly through the use of the START_EDIT and END_EDIT procedures.

This procedure must be used when a control, such as a Listbox, is used to fill a grid cell by providing a list of text selections in lieu of actually entering text into the grid cell. When the POPULATE procedure is executed, it simulates the typing of text in a manner that allows the RESTORE procedure to be executed , if required, at a later time. This procedure is valid only when applied to the main grid (GML_TPL.MEMBER%=1).

Example

Control ID 2402 is a listbox that has generated the event code l, which indicates a click on a listbox item has occurred. GML procedure CURRENT is executed to determine the current row of the grid associated with the listbox. The text from the listbox item selected is obtained by using the CTRL function, and then placed into the grid at column 2 (row_n%) by moving the text into GML_TPL$ template variable GML_TPL.COL$[2] .

3660 IF EVENT.CODE$= l AND EVENT.ID%=2402 THEN GOSUB LB
.
.
7980 LB:
7990 GML.SET%=1
8000 CALL "GML::TPL_PREP"
8010 CALL "GML::CURRENT"
8020 LET ROW_N%=GML_TPL.ROW_N%
8030 CALL "GML::TPL_PREP"
8040 LET GML_TPL.ROW_N%=ROW_N%
8050 LET GML_TPL.COL$[2]=CTRL(SYSGUI,EVENT.ID%,1)
8060 CALL "GML::POPULATE"

See Also

Visual PRO/5 Grid Management Library

Alphabetical Listing of GML Procedures