Help / Developing an application or website / Controls, windows and pages / Controls: Available types / TimeLine control
  • Overview of TimeLine control
  • Creating a TimeLine control
  • Characteristics of TimeLine control
  • Control options
  • Context menu proposed automatically
  • Customize the event area
  • Modes for filling a TimeLine control
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Overview of TimeLine control
The TimeLine control is used to represent chronologies of close events that can be parallel.
This control is used for example:
  • to perform a video editing.
  • to represent events on a robot.
  • to perform an animation.
Creating a TimeLine control
To create a TimeLine control:
  1. On the "Creation" tab, in the "Graphic controls" group, expand "Time" and select "TimeLine".
  2. Click at the desired location to create the control. The control appears in the editor.
Remark: The dimensions of the control are optimized to take up the available space at the specified position. If the control size does not suit you, press Ctrl + Z: the control size will be reset to default.
To view the characteristics of the control, select "Description" in the context menu.
Characteristics of TimeLine control

Control options

The TimeLine control can be configured in the editor via the description window ("Details" tab).
The parameters of the TimeLine control are as follows:
  • Events unit: Defines the unit used for the TimeLine control: second, millisecond or microsecond. This parameter is used to define:
    • the display unit used by the control at runtime.
    • the unit used for the different values in the description window.
  • Display mask: Used to define the format of the time displayed in the ruler.
  • Visible range: Number of seconds visibles in the TimeLine.
  • Total range: Number of seconds displayed by the TimeLine.
  • Characteristics of events
    • Overlap: Manage the overlap of events. The events can be displayed side by side or slightly offset.
    • Event granularity: Precision for displaying the TimeLine control. You can define:
      • the granularity when moving an event (1 time unit by default).
      • the granularity regarding the duration of an event, which means the minimum duration of an event (1 time unit by default).
  • Characteristics of the playhead: The playhead allows you to view the position in the TimeLine control. The playhead options are as follows:
    • Show playhead: The playhead will be displayed in the control. In this case, it can be made modifiable (or not) by the user.
    • Movable playhead: If this option is selected, the user will be able to move the playhead in the TimeLine control with the mouse.
  • Allow time range selection: Allows the user to select a period with the mouse.
  • Allow the direct input of an event: Allows the user to add an event directly. To do so, click the TimeLine control to create the event and enter its caption with the keyboard.
  • Position of the time bar: The time bar can be displayed at the top or at the bottom of the TimeLine control.
  • Horizontal scrollbar: The horizontal scrollbar is used to scroll the content of the TimeLine control. It can be automatic, always displayed or never.
The edit options via the mouse are as follows:
  • Change duration. You can allow users to change the duration of an event.
  • Move. You can allow users to move an event.
  • Allow the user to change track. You can allow users to change the track of the event.
  • Allow users to overlap elements. If this option is checked, when moving events, the user will be able to make them overlap. In this case, the options defined for the overlap of events (offset of side by side) will be taken into account.
The options regarding the dimension of areas are as follows:
  • Width of header for the tracks:
    • according to the track caption.
    • fixed.
  • Minimum height of a track.

Context menu proposed automatically

The TimeLine control can display a specific context menu proposing automatic features to the user. This menu is proposed by the AAF (Automatic Application Features).
As soon as at least one track is found in the TimeLine control, this menu allows the user to:
  • Zoom in and out in the control.
  • Add, delete or modify an event when selecting a time period.
    Remarks: If the control is bound to a data source, the data deleted in the control is also deleted from the data source.
  • Copy the content of an event.
For more details on the features of this context menu, see Automatic features of TimeLine control.

Customize the event area

In the TimeLine control, the event is displayed in a specific area. You have the ability to translate and customize this area: title color, background color of the event, ...
To customize the display of events:
  1. Open the TimeLine control description window.
  2. In the "General" tab, select the internal window used for the events:
    • "None": the default display mode will be used.
    • "Preset window": a preset window is automatically added to the project. By default, this window is named "IW_WinDevViewAPT.wdw".
    • "Simplified drawing": the event is displayed without title.
  3. If "Preset window" has been selected, the internal window will be available in the project explorer. It can be edited in the window editor.
    Caution: this internal window can only be used to customize the drawing regarding the display of events. Only the code of the "Global declarations" event is executed. No other WLanguage events are run. Therefore, you cannot add buttons with a specific click code.
  • You also have the ability to use any internal window of your project.
  • The appearance of the events proposed by default can be configured by selecting "Event" in the "Style" tab of the control description window.

Modes for filling a TimeLine control

A TimeLine control can be filled:
Related Examples:
The Timeline control Unit examples (WINDEV): The Timeline control
[ + ] Using a TimeLine control
Minimum version required
  • Version 18
Click [Add] to post a comment

Last update: 03/20/2024

Send a report | Local help