Home | Sign in | French EN
This content has been translated automatically. Click here to view the French version.
  • Events managed by default
  • Events with procedures
  • Advanced use of events with procedure
  • Optional events
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Events managed by default
WINDEV manages the following events by default (in order of appearance in the code editor):
EventRuntime condition
InitializingRun when opening the window. *
Before creating the eventRun:
  • when "New event" is selected from the popup menu of TimeLine control.
  • during the direct input of a new event via the keyboard.
Entry in edit in an eventRun:
  • when "New event" is selected from the popup menu of TimeLine control.
  • during the direct input of a new event via the keyboard.
This event is run immediately after the event "Before creating the event".
Exit from input for the eventRun during the exit from event input (exit when adding an event or when modifying an event via the popup menu for example).
Selecting an eventRun when selecting an event found in the TimeLine control.
Moving an eventRun when moving an event in the TimeLine control. This event is run at the end of the movement with the mouse (when the mouse is "released").
Resizing an eventRun when resizing an event in the TimeLine control (resize operation performed with the mouse for example). This event is run at the end of the resize (when the mouse is "released").
Deleting an eventRun:
  • when "Delete the event" is selected from the popup menu of TimeLine control.
  • when an event is deleted via the DEL key of keyboard.
Range selectionRun when selecting a time period in the TimeLine control (click performed on a time range for example). When selecting a set of time slots with the mouse, the event is executed for each new selected slot.
Reassigning an eventRun when moving an event triggers the modification of the track associated with the event.
Whenever modifiedRun when moving the pager in the TimeLine control

(*) By default, the event "Initializing" of each control is run according to the order in which the controls were created in the window. To modify this runtime order:
  1. On the "Window" pane, in the "Order" group, click "Initialization".
  2. In the window that is displayed, use the arrows on the right to modify the initialization order of controls.
Events with procedures
To simplify the operations performed on the events of a TimeLine control, several procedures are proposed in each event. These procedures take as parameter the EventTimeline variable to use. All the details of the event handled by the popup menu are automatically assigned to this variable.
Example: To store in an EVT data file an event added by the user via the popup menu, all you have to do is enter the following code in the event "Exit from event input":
PROCEDURE ExitFromInput(evtModified is EventTimeline)

// Store the data
EVT.Title = evtModified..Title
EVT.EvtStart = evtModified..Start
EVT.EvtDate = evtModified..End

Advanced use of events with procedure

You can also allow the user to define more precisely the characteristics of his event during an addition or a modification. To do so, create a window with the information to specify.
In the code, all you have to do is open the window in the event "Enter the event in input". To lock the direct input via the popup menu of the TimeLine control, the event must return False.
This principle can be applied to all the events called via the popup menu of the TimeLine control.
PROCEDURE Edit(evtEdited is EventTimeline)

// Opens the window for entering an event
// with the selected event (in Creation or Modification mode)
Open(WIN_InputEVT_HFSQL, evtEdited)

// Returns False to lock the direct input in the TimeLine control
Optional events
Several optional events can be managed. To add an optional event:
  1. Select the requested 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, with double click,
  • the mouse wheel, etc.
See Optional events for more details.
Minimum version required
  • Version 18
Click [Add] to post a comment