GML::END_EDIT - Terminate Grid Edit Mode
Syntax
CALL "GML::END_EDIT"
Description
This procedure terminates editing mode of a main grid cell and updates the text grid cell data array. This procedure is executed after the application program has received a GML.NOTIFY% value of 6, which indicates a special key was pressed by the user during the process of editing a cell. When program GML_M places the value of 6 in the GML.NOTIFY% variable it also places the current row data into the GML_TPL$ template with the newly entered text in the template variable GML_TPL.TEXT$. In addition, a value corresponding to the key that was pressed is placed in the GML_TPL.FLAG% variable. These values are as follows:
1 |
Enter |
2 |
Tab |
3 |
Shift + Tab |
4 |
<Up Arrow> |
5 |
<Down Arrow> |
6 |
<Page Up> |
7 |
<Page Down> |
8 |
Esc |
11 |
F1 |
12 |
F2 |
13 |
F3 |
14 |
F4 |
15 |
F5 |
16 |
F6 |
17 |
F7 |
18 |
F8 |
19 |
F9 |
Options
If, prior to executing the END_EDIT procedure, a mask is placed into variable GML_TPL$ template variable GML_TPL.MASK$[c] (where [c] is the GML_TPL.COL_N% value) it will be used to format text that is contained in the grid cell data array.
The values in the GML_TPL.DEF_FLAG% variable are additive.
The END_EDIT procedure normally moves the highlighted cell to the next editable cell in the grid. Setting GML_TPL.DEF_FLAG% to a value of 1 will prevent the procedure from performing this action.
Setting variable GML_TPL.DEF_FLAG% to 2 will prevent the END_EDIT procedure from executing the GML routine that administers the amount of visible rows that can be viewed beyond the last row of data that contains text.
Additional Notes
If the next editable cell selected by the END_EDIT procedure is in a different row, then the GML_TPL.FLAG% variable will contain the old (previous) row number.
Example
4720 SWITCH GML.NOTIFY%
4730 REM +----------------------+
4740 REM ! SPECIAL KEY PRESSED !
4750 REM +----------------------+
4760 CASE 6
4770 SWITCH GML_TPL.FLAG%
4780 REM +-------------+
4790 REM ! ENTER KEY !
4800 REM +-------------+
4810 CASE 1
4820 CALL "GML::END_EDIT"
4830 BREAK