PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • 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
WINDEV WINDEV manages the following events by default (in order of appearance in the code editor):
EventRuntime condition
InitializingExecuted when the window is opened. *
Change range (zoom)Executed after zooming in our out in the Diagram Editor control (zoom button, Ctrl + wheel, etc.).
Before closing a documentExecuted before closing the diagram in the Diagram Editor control.
Add a shapeExecuted when a shape is added in the Diagram Editor control.
Select a shapeExecuted when a shape is selected in the Diagram Editor control.
You can get the characteristics of the selected shape using the Selection property, which returns a variable of type diagSelection.
Remark: when creating a shape from a library, the shape is selected.
Move a shapeExecuted when a shape is moved in the Diagram Editor control.
Resize a shapeExecuted when a shape is resized in the Diagram Editor control.
Change a shapeExecuted when a shape is modified in the Diagram Editor control (e.g., when the text associated with the shape is validated).
Double click on a shapeExecuted when a shape is double-clicked in the Diagram Editor control.
Whenever modifyingExecuted whenever the Diagram Editor control is modified: move shape, add shape, delete shape, etc.

(*) By default, the "Initializing" event of each control is executed according to the order in which the controls were created in the window. To modify this order of execution:
  1. On the "Window" tab, in the "Order" group, click "Initialization".
  2. In the window that appears, use the arrows on the right to change the order in which the controls are initialized.
WEBDEV - Server code WEBDEV manages the following events by default (order of appearance in the 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 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, 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