ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / TimeLine functions
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
Adds an event into a TimeLine control.
Example
// Adds a 5-second event into a TimeLine control configured to the second
MyTrack is string
MyTitle is string
EvtStart is int
EvtEnd is int
 
MyTrack = "Strings"
MyTitle = "Start"
EvtStart = 4
EvtEnd = 9
 
TimelineAddEvent(TL_Music, MyTrack, MyTitle, EvtStart, EvtEnd)
TimelineDeleteAll(TL_Robots)
Evt is EventTimeline
 
TimelineAddTrack(TL_Robots, "Robot 1")
Evt.Track = "Robot 1"
Evt.Title = "Start"
Evt.Start = 10
Evt.End = 150
Evt.BackgroundColor = LightGreen
TimelineAddEvent(TL_Robots, Evt)
Syntax

Adding an element by specifying its characteristics Hide the details

<Result> = TimelineAddEvent(<TimeLine control> , <Track> , <Title> , <Start> [, <End> [, <Category>]])
<Result>: Integer
  • Index of the new event,
  • -1 if an error occurred. ErrorInfo is used to identify the error.
Remark: You can handle the new event directly with its index, using the following notation: <TimeLine control>[<Index>]. You can modify the properties of this element.
<TimeLine control>: Control name
Name of TimeLine control into which the event will be added.
<Track>: Character string
Name of track associated with the event.
<Title>: Character string
Title of the event.
<Start>: Integer
Start of event. This parameter is expressed in the unit chosen for the display resolution of TimeLine control. If the display resolution is the second, this parameter will correspond to the start time of the event expressed in seconds.
Remark: The display resolution can be modified:
  • in the TimeLine control description window ("Details" tab).
  • with the TimelineChangeMode function.
<End>: Optional integer
End of event. This parameter is expressed in the unit chosen for the display resolution of TimeLine control.
If this parameter is not specified, the default duration of event will be set to 1 unit.
<Category>: Optional character string
Name of category associated with the event. If this parameter is not specified, the event is associated with no category. The category is automatically created if it does not exist.

Adding an event into a TimeLine control using the EventTimeline type Hide the details

<Result> = TimelineAddEvent(<TimeLine control> , <Event>)
<Result>: Optional integer
  • Index of the new event,
  • -1 if an error occurred. ErrorInfo is used to identify the error.
Remark: You can handle the new event directly with its index, using the following notation: <Name of TimeLine control>[<Index>]. You can modify the properties of this element.
<TimeLine control>: Control name
Name of TimeLine control into which the event will be added.
<Event>: EventTimeline variable
Name of the EventTimeline variable that describes the characteristics of the event to add.
Remarks
TimelineAddEvent is used to associate an event with a single track. To associate one event with several tracks, TimelineAddEvent must be called for each track.
Component: wd290mdl.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help