Kbase P4633: 4GL: How to move the focus to a widget on right mouse click
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/18/2003 |
|
Status: Unverified
GOAL:
4GL: How to move the focus to a widget on right mouse click when this widget has a popup menu
FIX:
Should the focus go to right-clicked widget when it has a popup menu? It seems there no real windows standard regarding that since some MS application behave like that, and some other don't.
Anyway, solution is to program it yourself with the MENU-DROP event of the menu widget, as shown bellow:
ON MENU-DROP OF MENU POPUP-MENU-FILL-IN-4 DO:
DEFINE VARIABLE h AS HANDLE NO-UNDO.
h = SELF:OWNER.
APPLY "ENTRY" TO h. /*The focus goes then to the widget when menu pops up.*/
END.
I you want it to be the default behavior:
ON MENU-DROP ANYWHERE DO:
DEFINE VARIABLE h AS HANDLE NO-UNDO.
h = SELF:OWNER.
APPLY "ENTRY" TO h.
END.