|
|
|
|
|
- Parameters passed to the child window to open
- Window opening mode
- Position of parent window
- Opening the same window several times
- Limitations
- Closing a window
- Title of the window to be opened
- Opening a component window
OpenChild (Function) In french: OuvreFille
Not available
Opens a non-modal child window. OpenChild is also used to: - define the display position of child window,
- pass parameters to the child window.
The following events are run when OpenChild is called: - "Global declarations" of the child window,
- control initialization codes (undefined order),
- processes/events after the call to the OpenChild function of the parent window,
- the child window is displayed.
Remark: By default, the child window keeps focus once it is opened. // Open the child window named "WIN_EditWindow" // without positioning and without passing parameters OpenChild(WIN_EditWindow)
// Open the child window named "WIN_EditWindow". // The value of the "EDT_EditCustomer" control is passed as parameter to the event // "Global declarations" of "WIN_EditWindow". OpenChild(WIN_EditWindow, EDT_EditCustomer)
// -- Event "Global declarations" of "WIN_EditWindow" // Retrieve the parameters PROCÉDURE WIN_EditWindow(Customer) HReadSeek(Customer, CustomerName, Customer) IF HFound() = True THEN FileToScreen() ELSE Error("No customer matches") END
Syntax
Opening a child window Hide the details
OpenChild(<Window> [, <Parameter 1> [... [, <Parameter N>]]])
<Window>: String or window name - Name of child window to open.
- Name and full path of child window (".WDW" file) to open.
You cannot specify the full name of file to open (".WDW" file).
<Parameter 1>: Type of value sent to the window (optional) First parameter that will be passed to the "Global declarations" event of the window to open. This parameter is passed by value and is considered a variable global to the window. This parameter cannot correspond to an array variable (arrays can only be passed by reference). <Parameter N>: Type of value sent to the window (optional) Nth parameter that must be passed to the "Global declarations" event of the window to open. This parameter is passed by value and is considered a variable global to the window. This parameter cannot correspond to an array variable (arrays can only be passed by reference).
Opening a child window while defining its position and its display level Hide the details
OpenChild(<Window name [ + <Level>]> [, <Parameter 1> [... [, <Parameter N>]]])
<Window name [ + <Level>]>: Character string + Integer constant Used to specify: <Parameter 1>: Type of value sent to the window (optional) First parameter that will be passed to the "Global declarations" event of the window to open. This parameter is passed by value and is considered a variable global to the window. This parameter cannot correspond to an array variable (arrays can only be passed by reference). <Parameter N>: Type of value sent to the window (optional) Nth parameter that must be passed to the "Global declarations" event of the window to open. This parameter is passed by value and is considered a variable global to the window. This parameter cannot correspond to an array variable (arrays can only be passed by reference). Remarks Parameters passed to the child window to open The parameters are retrieved in the event "Global declarations" of the window. Simply write the following line of code at the start: PROCEDURE <Window name> (<Parameter1> [, <Parameter2> [, ...]]) These parameters are passed by value and not by reference.
Window opening mode The window is opened in non-modal mode: - the child window becomes the current window.
- once the child window is opened, the processes following the call to OpenChild in the parent window are run.
- the user will have the ability to click one of the parent windows of opened window.
The controls found in the parent windows cannot be accessed by the user as long as a child window is opened.
Position of parent window The parent window always remains below the child window, even if the parent window is in edit. If this situation is not suitable, the child window must be opened by OpenSister (providing that the parent window is a non-modal window). Limitations - OpenChild must not be called in the project initialization code.
To display a "splash screen" window at the start of the application, use the "Splash screen" option when creating the executable. - OpenChild must not be called in the closing code of a child window.
Closing a window A window opened with OpenChild can be closed with Close (without parameters) from any event: - of the window,
- of a window control.
If a parent window is closed, its child windows are also closed. Title of the window to be opened By default, the window title is the one defined in the editor. Opening a component window To open a component window, all you have to do is use the name of the component window (the component being included in the project). For example: OpenChild(ComponentWindow) If a conflict occurs with a project element, the element name must be prefixed by the component name. For example: OpenChild(MyComponent.Window) To use the name of the window in a variable, the name of the component must be specified. For example: sWindow is string ="MyComponent.MyWindow" OpenChild(sWindow)
Business / UI classification: UI Code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|