|
|
|
|
|
- Parameters passed to the window to open
- Window opening mode
- Number of opened windows
- Closing a window
- Title of the window to be opened
- Minimized window
- Opening the window of a component
Open (Function) In french: Ouvre Opens a modal WINDEV window. Open is also used to: - set the window position,
- pass parameters to the window.
When Open is called, the following events and actions are executed: - the "Global declarations" event of the window,
- the "Initialization" events of the controls in the window (the order is undefined),
- the window "Initialization" event,
- the window is displayed (it becomes the current window).
Remark: The controls in the previous window are disabled. Mobile platforms: - iOS and UWP: Open is not available. Use OpenMobileWindow instead.
- Android: Using Open in Android is not recommended. We recommend that you use OpenMobileWindow. If it is necessary to process the value returned by the window, use the "Close a child window" event of the calling window.
// Open and reposition the "EditWindow" window // The Value1 and Value2 parameters are passed to the event // "Global declarations" of "EditWindow" // ReturnedValue will retrieve the returned value // when the "EditWindow" window is closed ReturnedValue = Open("EditWindow, 10, 15", Value1, Value2)
// Open a window at given position by using variables x, y are int x = MouseXPos(mpScreen) y = MouseYPos(mpScreen) Open(StringBuild("WIN_Popup,%1,%2", y, x))
Syntax
<Result> = Open(<Name of the window> [, <Parameter 1> [... [, <Parameter N>]]])
<Result>: Type corresponding to the retrieved value (optional) Value returned by the popup window when it is closed. This value is returned:- by the RETURN keyword in the window "Close" event,
- by the Close function,
- by the ReturnedValue property used before closing the window.
<Name of the window>: String or window name Corresponds to: - the name of the window to be opened.
- the name and full path of the window (".WDW" file) to be opened.
By default, the window is displayed according to the position defined in the editor. You can define the display position of the window. The window name is completed by the window display coordinates when opened. This parameter is of the form: "<Window name>, <Y>, <X>" where: - <Window name>: name (or name and full path) of window to open.
- <Y>: Y-coordinate (in pixels) of window (in relation to the upper-left corner of the screen or parent window).
- <X>: X-coordinate (in pixels) of window (in relation to the upper-left corner of the screen or parent window).
Remark: The coordinates are ignored if the window is defined as centered in the editor. <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 reference and is considered as a variable global to the window. <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 reference and is considered as a variable global to the window. Remarks Parameters passed to the window to open The parameters are retrieved in the "Global declarations" event of the window. Simply write the following line of code at the start of the event: PROCEDURE <Window name>(<Parameter1> [, <Parameter2> [, ...]]) For more details, see Window with parameters.
Window opening mode The window is opened in modal mode: - the result of Open will be known once the window is closed,
- the user will not be able to click in one of the parent windows of the current window.
Number of opened windows The number of windows that can be opened simultaneously depends on the available memory. Closing a window A window opened with Open can be closed with Close (without parameters) from any event associated with the window or a control in the window. 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|