PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Parameters passed to the child window to open
  • Opening mode of window
  • Position of parent window
  • Opening the same window several times
  • Limitations
  • Closing a window
  • Title of window to open
  • Opening a component window
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Opens a non-modal child window. <Page>.DaughterOpener is also used to:
  • define the display position of child window,
  • pass parameters to the child window.
The following events are run when <Page>.DaughterOpener is called:
  • "Global declarations" of the child window,
  • control initialization codes (undefined order),
  • processes/events after the call to the <Page>.DaughterOpener function of the parent window,
  • the child window is displayed.
Remark: By default, the child window keeps focus once it is opened.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 16 and later
WINDEVLinux This function is now available for WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for WINDEV applications in Linux.
WINDEVLinux This function is now available for WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 24 and later
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available for WEBDEV sites in Windows.
WEBDEV - Server codeWindowsLinux This function is available only to simplify the Webification of WINDEV projects. In a WEBDEV site, this function has the same behavior as PageDisplay.
New in version 24
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available for WEBDEV sites in Windows.
WEBDEV - Server codeWindowsLinux This function is available only to simplify the Webification of WINDEV projects. In a WEBDEV site, this function has the same behavior as PageDisplay.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available for WEBDEV sites in Windows.
WEBDEV - Server codeWindowsLinux This function is available only to simplify the Webification of WINDEV projects. In a WEBDEV site, this function has the same behavior as PageDisplay.
Example
// Ouverture de la fenêtre fille "FEN_SaisieFenêtre"
// sans positionnement et sans passage de paramètres
FEN_SaisieFenêtre.OuvreFille()
// Ouverture de la fenêtre fille "FEN_SaisieFenêtre".
// La valeur du champ "SAI_SaisieClient" est passée en paramètre à l'événement
// "Déclarations globales" de la fenêtre "FEN_SaisieFenêtre".
FEN_SaisieFenêtre.OuvreFille(SAI_SaisieClient)
// -- Evénement "Déclarations globales" de la fenêtre "FEN_SaisieFenêtre"
// Récupération des paramètres
PROCÉDURE FEN_SaisieFenêtre(Client)
Client.LitRecherche(NomClient, Client)
IF Client.Trouve() = True THEN
FileToScreen()
ELSE
Error("Aucun client ne correspond")
END
Syntax

Open a daughter window Hide the details

<Window>.OpenChild([<Parameter 1> [... [, <Parameter N>]]])
<Window>: Window name
  • Name of child window to open.
  • Name and full path of child window (".WDW" file) to open.
    Universal Windows 10 AppAndroidJava You cannot specify the full name of file to open (".WDW" file).
WINDEV To avoid giving focus to the opened window, use the following notation: <Window name> + NoFocus. The focus gain process of the child window will not be run. Caution: in this case, the window name must be enclosed in quotes.
<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 <Nom de la fenêtre> (<Paramètre1> [, <Paramètre2> [, ...]])
These parameters are passed by value and not by reference.

Opening mode of window

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 <Page>.DaughterOpener in the parent window are run.
  • the user will have the ability to click one of the parent windows of opened window.
    AndroidiPhone/iPadApple Watch The controls found in the parent windows cannot be accessed by the user as long as a child window is opened.
WINDEV Remark: <Page>.DaughterOpener gives focus to the child window. The code for gaining focus is run in the child window and the code for losing focus is run in the parent window. In order for the parent window to keep focus, use the NoFocus constant in the <Window name> parameter.
To manage MDI, use MDIOpen.

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).
WINDEVReports and QueriesUser code (UMC)

Opening the same window several times

  • If the same window is opened several time, we recommend that you use an alias. This alias is used to differentiate between each window.
  • The position of the calling window (relative to the screen or to the parent window) is chosen when the window is described in the editor. If the same window is opened several times (with an alias), the display positions must be modified at each opening (otherwise the windows will be stacked).
  • The number of windows that can be opened simultaneously depends on the available memory.

Limitations

  • The <Page>.DaughterOpener function must not be called in the initialization code of a project.
    WINDEV To display a "splash screen" window at the start of the application, use the "Splash screen" option when creating the executable.
  • Universal Windows 10 App <Page>.DaughterOpener must not be called in the closing code of a child window.

Closing a window

A window opened with <Page>.DaughterOpener can be closed with ferme (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 window to open

By default, the window title is the one defined in the editor.
To modify the window title, use NextTitle or CurrentTitle.

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(FenêtreDuComposant)
If a conflict occurs with a project element, the element name must be prefixed by the component name. For example:
OpenChild(MonComposant.Fenêtre)
To use the name of the window in a variable, the name of the component must be specified. For example:
sFenêtre is string ="MonComposant.MaFenêtre"
OpenChild(sFenêtre)
Business / UI classification: UI Code
Component: wd270obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment