Highlighted
Absent Member.
Absent Member.
450 views

[archive] Entry Mode in Grid

[Migrated content. Thread originally posted on 29 March 2007]

Hello,
Both a double-click and pressing a character key signify the start of entry mode in a grid. Is there any way to determine whether a double-click or a keystroke triggered entry mode? I want to perform a routine when the mouse is double clicked but NOT if a key is hit. The following routine performs it either way:

PaySelect-Gd-1-Ev-Msg-Begin-Entry.
Perform Acu-Screen1-Grid-Procedure
Set EVENT-ACTION To EVENT-ACTION-FAIL
.

Thanks
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Entry Mode in Grid

Inquire your grid for its ENTRY-REASON.
Then you can test your ENTRY-REASON to see if it was because of a double-click, enter key or another key.

We use these defined values:

78 GRID-DBLCLICK VALUE X"00".
78 GRID-ENTER-KEY VALUE X"0D".
78 GRID-ENTRY-REASON PIC X.

So, you would do:

INQUIRE MY-GRID ENTRY-REASON IN GRID-ENTRY-REASON.
IF GRID-ENTRY-REASON = GRID-DBLCLICK
DO SOMETHING
END-IF.
IF GRID-ENTRY-REASON = GRID-ENTER-KEY
DO SOMETHING-ELSE
END-IF.

If you typed a character to start the entry, then GRID-ENTRY-REASON would contain that character. So, if you typed a "B", GRID-ENTRY-REASON would have a B in it.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Entry Mode in Grid

Thanks a lot for your help, JGramer!!:cool:
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Entry Mode in Grid

Not a problem.

I mis-typed the GRID-ENTRY-REASON variable before.

it should be a 77 or 01 level, not a 78.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.