PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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).
Benefit: MyChildWindow can only be used in the event "Closing a child window". 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 ..Name.
  • the value returned by the child window via ..ReturnedValue.
Versions 21 and later
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Example
// Event "Closing 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
nSubscript is int
// Finds the customer row
nSubscript = LooperSeek(ATT_CustomerNum, Customer.CustomerNum)
IF nSubscript > 0 THEN
// Positions on the customer row
LooperPosition(LOOP_Customers, nSubscript)
END
END
Syntax
MyChildWindow
Remarks

Finding out the value returned by a child window

In the mobile applications, the windows are opened by OpenChild (instead of Open).
MyChildWindow allows you to know the name of the child window that was closed as well as the value it returned, when used in the event "Closing a child window" of the parent window (the one that called OpenChild).
In the mobile applications, the windows are opened by OpenMobileWindow (or OpenChild) instead of Open.
MyChildWindow allows you to know the name of the child window that was closed as well as the value it returned, when used in the event "Closing a child window" of the parent window (the one that called OpenMobileWindow or OpenChild).
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 event "Closing a child window" 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