Kbase P39786: How to prevent the user from closing a Window when the focus
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/29/2003 |
|
Status: Unverified
GOAL:
How to prevent the user from closing a Window when the focus is on a particular field-level widget?
GOAL:
How to disable the WINDOW-CLOSE event when current input focus is on a specific object?
FIX:
To prevent the user from closing the Application when the focus is on a particular fill-in widget for instance, insert the following code into the Window's WINDOW-CLOSE trigger:
ON WINDOW-CLOSE OF CURRENT-WINDOW
DO:
/* This event will close the window and terminate the procedure. */
IF FOCUS:NAME = "FILL-IN-1":U THEN
RETURN NO-APPLY.
APPLY "CLOSE":U TO THIS-PROCEDURE.
RETURN NO-APPLY.
END.