Kbase P125897: How to pass focus to a parent SmartWindow when its child is closed
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  14/09/2007 |
|
Status: Unverified
GOAL:
How to pass focus to a parent SmartWindow when its child is closed
GOAL:
How to pass focus between Window families related by the PARENT attribute.
GOAL:
How to stop focus going to the TOP level root SmartWindow in a window family when a child window is closed.
FACT(s) (Environment):
Windows
Progress 9.x
OpenEdge 10.x
FIX:
In window Families related by the PARENT attribute, windows are not siblings of each other as there is a hierarchic relationship with a root window and multiple child windows. To pass focus to a child SmartWindows immediate parent window in the family, modify the WINDOW-CLOSE trigger of the child as follows:
DO:
DEFINE VARIABLE h_parent AS HANDLE NO-UNDO.
h_parent = THIS-PROCEDURE:CURRENT-WINDOW:PARENT.
APPLY "CLOSE":U TO THIS-PROCEDURE.
CURRENT-WINDOW = h_parent.
APPLY 'ENTRY' TO h_parent.
RETURN NO-APPLY.
END.
When using this method it is possible that a slight flicker is noticeable as focus is passed from SmartWindow to SmartWindow. Therefore as an alternative, do not to use Window Families at all, but structure all SmartWindows as siblings of each other. Focus will then pass between SmartWindows correctly by default, but an alternative method of closing a SmartWindows 'logical' children must be used when a SmartWindow is closed. This could be done by each SmartWindow maintaining a list (temp table) of all it's logical children and closing them when its own WINDOW-CLOSE trigger is executed.