ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage syntax / Reserved keywords
  • Finding out the value returned by a child 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
MyChildWindow (Reserved word)
In french: MaFenêtreFille
MyChildWindow is used to handle the child window of the current window. When running the window, MyChildWindow is replaced by the window (and not by the name of the window).
Use: MyChildWindow can only be used in the "Close a child window" event. This keyword is used to handle in this code the characteristics of the child window that was closed. This allows you to retrieve:
  • the name of the child window that was closed by the Name property.
  • the value returned by the child window via the ReturnedValue property.
Example
// Event "Close a child window of WIN_List_Customers"
// -------------------------------------------------------------
// Refreshes the list of customers
LooperDisplay(LOOP_Customers, taReExecuteQuery)
 
// For any return (except for the deletion)
IF MyChildWindow.ReturnedValue <> -1 THEN
nIndex is int
// Finds the customer row
nIndex = LooperSearch(ATT_CustomerNum, Customer.CustomerNum)
IF nIndex > 0 THEN
// Positions on the customer row
LooperPosition(LOOP_Customers, nIndex)
END
END
Syntax
MyChildWindow
Remarks

Finding out the value returned by a child window

In the mobile applications, the windows are opened by OpenMobileWindow (or OpenChild) instead of Open.
MyChildWindow allows you to get the name of the child window closed as well as the value it has returned, when used in the "Close a child window" event of the parent window (the window in which OpenMobileWindow or OpenChild were called).
For example:
  • In the closing code of the child window, Close is used to return a parameter:
    Close("", MyParameter)
  • The name of the child window as well as the returned value can be retrieved in the "Close a child window" event of the calling window:
    // Close a child window
    NameChildWindow = MyChildWindow.Name
    ValueChildWindow = MyChildWindow.ReturnedValue
Related Examples:
WM Expense Account Cross-platform examples (WINDEV Mobile): WM Expense Account
[ + ] This example allows you to manage your fees.

Let's see the main features of this application:
- The input of invoices
- Management of foreign currencies
- Inclusion of photo document for the invoices
- Ability to email the expense account
- Ability to track the expense accounts
- ...
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/23/2023

Send a report | Local help