PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Handling the current supercontrol
  • Using MyParent in a procedure
  • Summary
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
MyParent (Reserved word)
In french: MonParent
MyParent is used to handle:
  • The current supercontrol from an element of the supercontrol.
    When running the window, MyParent is replaced by the supercontrol (and not by the name of the supercontrol). Then, MyParent is used like a supercontrol.
    Benefit: MyParent is used to make the code of the controls found in the supercontrol (control, button, ...) or the code of the functions associated with the supercontrol independent of the supercontrol name.
  • The current report from one of the report controls.
  • The current window from one of the window controls.
Versions 16 and later
Universal Windows 10 App This feature is available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This feature is available for the Windows Phone applications.
Universal Windows 10 App This feature is available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This feature is available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This feature is available for the iPhone/iPad applications.
iPhone/iPad This feature is available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This feature is available in Windows Store apps mode.
Android Widget This feature is available in Android Widget mode.
New in version 18
Universal Windows 10 App This feature is available in Windows Store apps mode.
Android Widget This feature is available in Android Widget mode.
Universal Windows 10 App This feature is available in Windows Store apps mode.
Android Widget This feature is available in Android Widget mode.
Versions 21 and later
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
New in version 21
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Example
// Code of selection button
FileName = fSelect(fExtractPath(FileName, fDirectory), ...
fExtractPath(FileName, fFileName + fExtension), ...
"Select a file", "All the files (*.*)" + TAB + "*.*", "")

// The value of the supercontrol corresponds to the selected file
MyParent..Value = FileName
Syntax
MyParent
Remarks

Handling the current supercontrol

  • MyParent is always replaced by the current supercontrol. For example, passing a parameter:
    CallProcedure(MyParent)
  • MyParent can only be used in the processes that handle the current supercontrol (for example, in the processes associated with a control found in the supercontrol, in the procedures associated with the supercontrol, ...).

Using MyParent in a procedure

MyParent can be used in a procedure associated with the current supercontrol. In this case, MyParent refers to the current supercontrol.

Summary

Code where MyParent is usedMyParent corresponds to
windowwindow
window controlwindow
window procedure, with a direct call from a window codewindow
window procedure, with a call via <Window>.<Procedure>window
window supercontrolsupercontrol
control of window supercontrolsupercontrol
procedure of window supercontrol with a direct call from a code of the supercontrolsupercontrol
procedure of window supercontrol with a call via <Supercontrol>.<Procedure>supercontrol
internal windowParent container of internal window (window, internal window, ...)
control of internal windowinternal window
procedure of internal window with a direct call from a code of the internal windowinternal window
procedure of internal window with a call via <InternalWindow>.<Procedure>internal window
supercontrol of internal windowinternal window
control of supercontrol of internal windowsupercontrol
procedure of supercontrol of internal window with a direct call from a code of the supercontrolsupercontrol
procedure of supercontrol of internal window with a call via <Supercontrol>.<Procedure>supercontrol
Note: This table also applies to the pages and to the internal pages.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment