GML::LUM_DISPLAY - Overlay Look-up Control on Grid Cell
Syntax
CALL "GML::LUM_DISPLAY"
Description
This procedure overlays a look-up control on a main grid cell. When this procedure is executed, the location of the control will be determined by the values of the variables contained in the GML_LUM$ template that were initialized at the application start-up.
Options
When GML_TPL.DEF_FLAG% is set to 0, the look-up control is positioned and displayed based on parameters reported in grid notify events 15 or 18 (example 1).
If GML_TPL.DEF_FLAG% is set to 1, the look-up control will be positioned and displayed based on column and row number values contained in GML_TPL$ template variables GML_TPL.COL_N% and GML_TPL.ROW_N% (example 2).
If the look-up control is a listbutton and GML_TPL.OPTION% is set to 1, the LUM manager will execute a 'LISTSEL' based on the value in GML_TPL.ARG% when the control is displayed.
If the look-up control is a listedit and GML_TPL.OPTION% is set to 2 and text is placed into GML_TPL.TEXT$, the text will be placed in the listedit selection (edit) area when the control is displayed.
Setting variable GML_TPL.SUP% to 1 will enable the LUM auto-hide feature for the look-up control, while setting GML_TPL.SUP% to 2 will disable the LUM auto-hide feature. The LUM auto-hide feature mode can also be changed by executing the LUM_MODE procedure.
Example 1
In the following example, GML.NOTIFY% 18 is being used as the event that activates (shows) the look-up control. If there is a control associated with the information contained in the GML_TPL$ template, that control is displayed. However, if no look-up control is associated with the GML_TPL$ information, the call to LUM_DISPLAY will have no effect.
7170 REM +------------------+
7180 REM ! RIGHT CLICK !
7190 REM ! GML.NOTIFY%=18 !
7200 REM +------------------+
7210 CASE 18
7220 SWITCH GML_TPL.MEMBER%
7230 CASE 1
7240 IF GML_TPL.FLAG%=1 THEN CALL "GML::LUM_DISPLAY"
7250 BREAK
Example 2
A look-up is displayed on the main grid cell located at column 2, row 8 (the look-up has been previously defined as associated with column 2):
4310 GML.SET%=1
4320 CALL "GML::TPL_PREP"
4330 GML_TPL.COL_N%=2
4340 GML_TPL.ROW_N%=8
4350 GML_TPL.DEF_FLAG%=1
4360 CALL "GML::LUM_DISPLAY"