ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Control template
  • Events managed by default
  • Optional events
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
Events associated with control templates
Events managed by default
WINDEV Mobile WINDEV and WINDEV Mobile manage the following events for control templates:
EventRuntime condition
Global declarationsDeclaration of variables global to the control template.
This event is run before the "Global declarations" event of the host window (window in which the control template is integrated).
InitializingRun when the window is opened.
The events are run in the following order:
  • Initializing the controls of host window
  • Initialization of the window
  • Focus gain
EntryRun when the cursor enters in one of the controls of control template.
ExitRun when changing control (going from a control found in the control template to another window control).
Whenever modifiedRun whenever the content of control template is modified.
Set the Value propertyExecuted each time the Value property is specified for the control template (directly or with the Value property). This event is used to retrieve the parameters passed to the control template, for example. See programming the control templates.
Get the Value propertyRun whenever the Value property of the control template is retrieved. This event allows the control template to return a value to the window that hosts the Control Template control. See programming the control templates.

Remark: The control templates can have their own local procedures. These local procedures can be created:
  • from the "Project explorer" pane (select the control template then "Local procedures", "New local procedure" in the context menu).
  • from the code editor (go to the "Code" tab, "Procedures" group, expand "New" and select "New local procedure").
Optional events
Several optional events are supported. To add an optional event:
  1. Select the desired control.
  2. Display the code window of this control (F2 key).
  3. Click the link "Add other events to xxx" at the bottom of the window code, after the last event.
  4. All the optional events available for the control are displayed.
  5. Check the optional event to add and validate.
    Remark: You can select several optional events.
  6. The selected optional event is automatically added to the events managed by the control.
To disable an optional event, simply perform the same operations to display the list of optional events. Then simply uncheck the optional events to delete.
Remark: If the disabled code contains WLanguage code, this code is automatically deleted.
You can manage, for example:
  • the mouse hover over the control,
  • left mouse button down, up, with a double click,
  • right mouse button down, up, double click,
  • mouse wheel, etc.
For more details, see the Optional events.
See also
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help