Parameters passed to the window to open Window opening mode Position of parent window Opening the same window several times Limitation Closing a window Title of the window to be opened Opening the window of a component
OpenChild (Function)
In french: OuvreFille
Not available
Opens a non-modal child window.
The following events are run when OpenChild is called:
"Global declarations" event of the child window, "Initialization" events of controls in the child window (in any order), events after the call to OpenChild in the code of the parent window, the child window is displayed. Remarks :
By default, the child window retains focus once it is opened. OpenChild can also be used to define the position and pass parameters to the child window.In standard syntax, these parameters are passed directly. New in SaaS When you use a variable of type to open a window, you can use the property to define the characteristics of the window, and the property to pass parameters.
Note : This feature is only available from WINDEV Suite SaaS 2025 - Update 4. For more details, see Using new features exclusive to WINDEV Suite SaaS 2025 .
OpenChild ( WIN_EditWindow )
OpenChild ( WIN_EditWindow , EDT_EditCustomer )
PROCEDURE WIN_EditWindow ( Customer )
HReadSeek ( Customer , CustomerName , Customer )
IF HFound ( ) = True THEN
FileToScreen ( )
ELSE
Error ( "No customer matches" )
END
Syntax
Opening a child window (standard syntax) 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 the file to open (".WDW" file). <Parameter 1>: Type of value sent to the window (optional)
First parameter to 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 be a variable of type array (arrays can only be passed by reference). <Parameter N>: Type of value sent to the window (optional)
Nth parameter to 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 be a variable of type array (arrays can only be passed by reference).
Opening a child window by defining its position and level (standard syntax) Hide the details
OpenChild(<Window name [ + <Level>]> [, <Parameter 1> [... [, <Parameter N>]]])
<Window name [ + <Level>]>: String + Integer constant
Used to specify: <Parameter 1>: Type of value sent to the window (optional)
First parameter to 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 be a variable of type array (arrays can only be passed by reference). <Parameter N>: Type of value sent to the window (optional)
Nth parameter to 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 be a variable of type array (arrays can only be passed by reference). New in SaaS Remarks
Parameters passed to the window to open
The parameters are retrieved in the "Global declarations" event associated with the window. The first line of code of this event must correspond to the following line:
PROCEDURE <Window> (<Parameter 1> [, ... [, <Parameter N>]])
where:
<Window > must correspond to the name of the window. <Parameter N> must correspond to the parameters expected. Note: These parameters are passed by value, not by reference. For more details, see
Window with parameters .
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).
Limitation
OpenChild must not be called in the project initialization code.
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 (in the "General" tab of the description window).
To change the window title:
Opening the window of a component
To open the window of a component, simply use the name of the component window (component 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…