Kbase P51120: How to define additional accelerator keys for a given menu item?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  02/08/2006 |
|
Status: Unverified
GOAL:
How to define additional accelerator keys for a given menu item?
GOAL:
How to fire the CHOOSE event trigger of a given menu-item when the user presses one of several keyboard keys?
GOAL:
How to code the ANYWHERE option with the ON statement?
FIX:
1. The following code will define the keyboard keys 'A' and 'B' as additional accelerator keys for the named menu-item:
ON 'a':U, 'A':U, 'b':U, 'B':U, 'c':U, 'C':U OF FRAME {&FRAME-NAME} ANYWHERE DO:
APPLY 'choose' TO MENU-ITEM menu-item-name IN MENU main-menu-name.
END.
2. The following code is another sample of using the ANYWHERE option of the ON statement as used in defining the ENTRY event trigger of a FRAME widget:
ON ENTRY OF FRAME DEFAULT-FRAME
ANYWHERE DO:
MESSAGE "entered"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.