- Handling the current supercontrol
- Using MyParent in a procedure
- Summary
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 with the supercontrol (and not by the name of the supercontrol). Then, MyParent is used like a supercontrol. Advantage: 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.
// Code of selection button FileName = fSelect(fExtractPath(FileName, fDirectory), ... fExtractPath(FileName, fFile + fExtension), ... "Select a file", "All the files (*.*)" + TAB + "*.*", "") // The value of the supercontrol corresponds to the selected file MyParent..Value = FileName
Remarks Handling the current supercontrol - MyParent is always replaced with the current supercontrol. For example, passing a parameter:
- 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. | | Code where MyParent is used | MyParent corresponds to | window | window | window control | window | window procedure, with a direct call from a window code | window | window procedure, with a call via <Window>.<Procedure> | window | window supercontrol | supercontrol | control of window supercontrol | supercontrol | procedure of window supercontrol with a direct call from a code of the supercontrol | supercontrol | procedure of window supercontrol with a call via <Supercontrol>.<Procedure> | supercontrol | internal window | Parent container of internal window (window, internal window, ...) | control of internal window | internal window | procedure of internal window with a direct call from a code of the internal window | internal window | procedure of internal window with a call via <InternalWindow>.<Procedure> | internal window | supercontrol of internal window | internal window | control of supercontrol of internal window | supercontrol | procedure of supercontrol of internal window with a direct call from a code of the supercontrol | supercontrol | procedure of supercontrol of internal window with a call via <Supercontrol>.<Procedure> | supercontrol |
Remark: This table also applies to the pages and to the internal pages.
This page is also available for…
|
|
|
|