|
|
|
|
|
- Handling the current control
- Specific uses
MyControl (Reserved word) In french: MonChamp
The MyControl keyword represents the control that holds the process being executed. Use: MyControl is commonly used in procedures and properties directly associated with controls. // Use the MyControl keyword to add elements in a Table control // Initialization code of a Table control MyControl.AddLine("Davis", "Peter")
Remarks Handling the current control - The MyControl keyword is always replaced with the current control. For example:
- MyControl.<WLanguage property>
Calls and executes the specified property on the current control. Example:
// Click code of the Button control Mycontrol.Caption = "Test in progress"
- MyControl.<WLanguage function in prefix syntax>
Calls and executes the specified function on the current control. Example:
// Initialization code of a Table control MyControl.AddLine("Davis", "Peter")
- MyControl.<User property>
Calls and executes a user property linked to the control. This user property can be created and associated with the control by selecting "New property" in the context menu of the control in the "Project explorer" pane. - MyControl.<User procedure>
Calls and executes a user procedure linked to the control. This user procedure can be created and associated with the control by selecting "New procedure" in the context menu of the control in the "Project explorer" pane.
Remark: If a user property overrides a WLanguage property or function, simply use "WL." before the "MyControl" keyword to call the original WLanguage property or function. For example: // The "Caption" property has been redefined for the control // Use of the WLanguage "Caption" property WL.MyControl.Caption = "Test" Specific uses - The MyControl keyword can be used in an internal procedure defined directly in one of the events of the control.
- The MyControl keyword cannot be used:
- In a procedure local to the window.
- In a procedure global to the window.
- In a procedure called by a thread or a parallel task.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|