ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage syntax / Reserved keywords
  • Handling the current control
  • Specific uses
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Example
// Use the MyControl keyword to add elements in a Table control
// Initialization code of a Table control
MyControl.AddLine("Davis", "Peter")
Syntax
MyControl
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.
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/09/2023

Send a report | Local help