Skip to main content

[archive] Entry Mode in Grid

  • March 29, 2007
  • 3 replies
  • 0 views

[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

3 replies

[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
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.

[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
Thanks a lot for your help, JGramer!!:cool:

[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
Not a problem.

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

it should be a 77 or 01 level, not a 78.