Principle of inheritance and override
When a window template is applied to a window, all the controls and code found in the template are "copied" into the window. This is the concept of inheritance.
The template controls are visible in the window, in the window editor. A yellow square is found in the upper-left corner of each control. By default, the controls found in the template cannot be modified.
The template code is visible in the code editor, in the different events of the window or its controls. This WLanguage code can be easily identified:
- the events associated with the template are followed by "(<Template name> template)" (for example: "Click the Validate button (MyTemplate template)").
- the background of the events is grayed because the code cannot be modified.
For a template of templates, the inheritance is performed on several levels.
You can override controls, local procedures and the code of the template. Overriding controls, local procedures and the code enables you to modify, for a given window, the code, the local procedures and/or the controls of the template.