M.Cairns
M.Cairns

Reputation: 49

OpenEdge ABL UI Freeze window until Popup closes

I'm using OpenEdge ABL to create a window that will run a secondary window on the touch of a button. However I am trying to get the first/parent window to freeze while the child window is running and resume when the child window closes.

I attempted to use WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW on the parent window however this returned the error: Invalid widget handle used in WAIT-FOR statement. WAIT-FOR terminated (4122).

To run the child window I use:

RUN D:\adherenceEdit_12875-Win.w(cUserId,cShiftCode,dtDate).

Upvotes: 0

Views: 394

Answers (3)

Raphael Frei
Raphael Frei

Reputation: 416

I like to do this by hiding the Main Window while the Popup is opened...

    // Replace the C-Win to window's name - Not required to specify the frame
    C-Win:VISIBLE = FALSE.
    RUN My_Program.w.
    C-Win:VISIBLE = TRUE.

Upvotes: 0

M.Cairns
M.Cairns

Reputation: 49

I got around this was by adding:

 DO WITH FRAME {&FRAME-NAME}:

Making the sensitivity of the buttons false meant that they would not be pressed while the child window was running.

  ASSIGN CURRENT-WINDOW:SENSITIVE = FALSE.


  RUN D:\adherenceEdit_12875-Win.w(INPUT cUserId,
                                   INPUT cShiftCode,
                                   INPUT dtDate).

After the child was closed the parent window continues running and resets the buttons sensitivity allowing them to be pressed

  ASSIGN CURRENT-WINDOW:SENSITIVE = TRUE.

 END.

I'm not sure if this is the most efficient way to do this and @nwahmaet's answer may have provided a more efficient method.

Upvotes: 0

nwahmaet
nwahmaet

Reputation: 3909

Are you trying to make the child window modal?

I think you can look into using the TOP-ONLY or ALWAYS-ON-TOP attributes on the window, or make the child a dialog box.

Upvotes: 1

Related Questions