Kbase P124225: 4GL: Why does the ENTER KEY not fire the LEAVE trigger of a FILL-IN widget when there is a DEFAULT (
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/4/2007 |
|
Status: Unverified
GOAL:
4GL: Why does the ENTER KEY not fire the LEAVE trigger of a FILL-IN widget when there is a DEFAULT (OK) button in the frame?
FACT(s) (Environment):
All Supported Operating Systems
FIX:
Default, Cancel and buttons selected with field level mnemonics (accelerators) do not move focus from the current widget. Hence, the LEAVE trigger of the widget that is in focus does not fire when such selection is done. When the ENTER KEY is pressed, the selection of the OK button is performed, that is the CHOOSE trigger of the DEFAULT (OK) button is fired but the focus remains on the widget that had it before the OK button was chosen. That is why the LEAVE trigger of that widget does not fire.
To force the LEAVE trigger of the widget that is in focus when such a selection is done, the developer must explicitly change the focus by using code along the similar to the following at the end of the CHOOSE trigger of such buttons:
DO:
/* Code for the CHOOSE event of the DEFAULT button goes here */
MESSAGE "CHOOSE trigger code goes here"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
/* Force the LEAVE trigger of the currently focused widget to fire */
IF FOCUS:HANDLE <> SELF:HANDLE THEN APPLY "entry" TO SELF.
END.