|
|
|
|
|
- Handling the current window
- Using MyWindow in a procedure
- WLanguage functions and current window
- Summary
MyWindow (Reserved word) In french: MaFenêtre
MyWindow is used to handle the current window. During the execution of the window, MyWindow is replaced with the window (and not by the name of the window). Therefore, MyWindow can be used like a window. Benefit: MyWindow is used to make local code (control, button, ...) or global code (global procedure, class, ...) independent of the current window. // Retrieve the title of the current window WindowTitle = MyWindow.Title
Remarks Handling the current window - MyWindow is always replaced with the current window. For example, using the Title property:
MyWindow..Title = "Type your data" MyCurrentTitle = MyWindow..Title  // Pass as parameter: CallProcedure(MyWindow)
- If the MyWindow keyword must be converted to a string, the result of the Value property is returned. For a window, the Value property returns the title of the window.
Trace(MyWindow) // Returns the title of the window
Example not to do:
ExecuteProcess(MyWindow, trtChange)
To do:
ExecuteProcess(MyWindow.Name, trtChange)
- MyWindow can only be used in the processes that handle the current window (in the processes associated with a control, a window, ...). MyWindow cannot be used in a report. To specify the current report in a report, use MyReport
- The MyWindow keyword does not allow you to use the global variables declared in the window.
- To handle a window control by using the MyWindow keyword, you have the ability to use the following syntax:
Info({MyWindow.Name + ".Button2"}..Caption)
Using MyWindow in a procedure The MyWindow keyword can be used in a local procedure or in a global procedure only if the procedure handles the current window. In this case, MyWindow refers to the current window. With a local procedure, MyWindow corresponds to the window to which the procedure belongs. WLanguage functions and current window To specify the current window in the WLanguage functions that accept a window name as parameter, use: - an empty string,
- MyWindow.
| | Code where MyWindow is used | MyWindow 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 | window | control of window supercontrol | window | procedure of window supercontrol with a direct call from a code of the supercontrol | window | procedure of window supercontrol with a call via <Supercontrol>.<Procedure> | window | internal window | window | control of internal window | window | procedure of internal window with a direct call from a code of the internal window | window | procedure of internal window with a call via <InternalWindow>.<Procedure> | window | supercontrol of internal window | window | control of supercontrol of internal window | window | procedure of supercontrol of internal window with a direct call from a code of the supercontrol | window | procedure of supercontrol of internal window with a call via <Supercontrol>.<Procedure> | window |
The MyWindow keyword can only be used from a window process or procedure
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|