ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Diagram Editor control
  • Default events
  • 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
Default events
WEBDEV - Server codeWEBDEV - Browser code The following events appear by default in the WEBDEV code editor:
EventRuntime condition
Initialization (Server code)Executed when the page is opened.
Whenever modifying (Browser code)Executed whenever the Diagram Editor control is modified: move shape, add shape, delete shape, etc.
Zoom in or out (Browser code)Executed after zooming in our out in the Diagram Editor control (zoom button, Ctrl + wheel, etc.).
Remark: The "RETURN True/False" statement determines whether or not the event is executed.
Add a shape (Browser code)Executed when a shape is added in the Diagram Editor control.
Remark: The "RETURN True/False" statement determines whether or not the event is executed.
Select a shape (Browser code)Executed when a shape is selected in the Diagram Editor control.
Move a shape (Browser code)Executed when a shape is moved in the Diagram Editor control.
Remark: The "RETURN True/False" statement determines whether or not the event is executed.
Resize a shape (Browser code)Executed when a shape is resized in the Diagram Editor control.
Remark: The "RETURN True/False" statement determines whether or not the event is executed.
Change a shape (Browser code)Executed when a shape is modified in the Diagram Editor control (e.g., when the text associated with the shape is validated).
Remark: The "RETURN True/False" statement determines whether or not the event is executed.
Delete a shape (Browser code)Executed when a shape is deleted in the Diagram Editor control.
Remark: The "RETURN True/False" statement determines whether or not the event is executed.
Double click on a shape (Browser code)Executed when a shape is double-clicked in the Diagram Editor control.

WLanguage functions and variables specific to Diagram Editor controls are not available in browser code. The solution is to use an invisible Button control containing the server code to be executed. The click code of this Button control can be executed from the browser code using ExecuteProcess with the trtClick constant.
Remarks:
  • It is recommended to use an "AJAX" server click code.
  • AJAXExecute cannot be used in browser events.
Optional events
Several optional events can be added. 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.
For example, you can use the following events:
  • the mouse hover over the control,
  • left mouse button down, up, double click,
  • right mouse button down, up, double click,
  • mouse wheel, etc.
For more details, see the Optional events.
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/23/2023

Send a report | Local help