ui.Window.close()

ui.Window.close() is used with a variable of the WINDOW data type to close windows opened by the open() or openWithForm() methods as well as windows initialized in the DEFINE statement for a ui.Window variable:

CALL win_var.Close()

This method accepts no arguments and returns no values. It closes the window associated with the WINDOW variable it is used with regardless of which window is the current one.

Closing a window opened with form closes also the form. Closing a window frees a WINDOW variable used and it can be used with the open() or openWithForm() methods again to open another window.

Example program:

MAIN

  DEFINE win ui.Window

OPEN WINDOW w WITH 20 ROWS, 40 COLUMNS attribute (border)

DISPLAY "5,5" AT 5,5

OPEN WINDOW w1 WITH 20 ROWS, 40 COLUMNS attribute (border)

LET win = ui.Window.ForName("w")

MENU

  ON ACTION "CloseW"

    CALL win.Close()

  ON ACTION 'Exit'

    EXIT MENU

END MENU

END MAIN

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.