User Tools

Site Tools


open_a_virtual_to_execute_on_event_openwindow_windowmanager_.htm
Navigation:  ABC Library Reference > WindowManager > WindowManager Methods >====== Open (open and initialize a window structure)C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Open, VIRTUAL

Open ( mainwindow, <;ownerwindow> ), VIRTUAL

blk2blue.jpg

mainwindow The label of the window that needs to be opened.
ownerwindow The label of the owner window, if applicable. This is the label of the APPLICATION or WINDOW structure which “owns” the mainwindow being opened.

The Open method, when called with the mainwindow and optional ownerwindow parameters, is used to open a window for processing. A mainwindow with an ownerwindow always appears on top, and is automatically hidden if the ownerwindow is minimized or hidden. If the ownerwindow is closed, all owned windows are also automatically closed.

The Open method when called without parameters, prepares the window for display. It is designed to execute on window opening events such as EVENT:OpenWindow and EVENT:GainFocus, and can optionally translate a window if necessary.

Implementation:

The Open method invokes the Translator if present and calls the Reset method to reset the WINDOW.

The TakeWindowEvent method calls the Open method.

Example:

ThisWindow.TakeWindowEvent  PROCEDURE

 CODE

 CASE EVENT()

   OF EVENT:OpenWindow

     IF ~BAND(SELF.Inited,1)

       SELF.Open(Window)

     END

   OF EVENT:GainFocus

     IF BAND(SELF.Inited,1)

       SELF.Reset

     ELSE

       SELF.Open

     END

 END

 RETURN Level:Benign

ThisWindow.Open  PROCEDURE

 CODE

   IF ~SELF.Translator&amp;=NULL

     SELF.Translator.TranslateWindow

   END

   SELF.Reset

   SELF.Inited = BOR(SELF.Inited,1)

!Usage with parameter(s):

SELF.Open(Window)

See Also:     Reset, TakeWindowEvent , TranslateWindow OPEN

open_a_virtual_to_execute_on_event_openwindow_windowmanager_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1