Skip to content

Add Method

Description

Adds a Marker to the Track Control.

Syntax

Public Function Add( _
    ByVal [Position](#) As Integer, _
    ByVal [Caption](#) As String _
) As [TrackMarker](XtremeGridControl~TrackMarker.md)

Parameters

  • Position: Position in the time line to place the marker.
  • Caption: Caption to display inside the marker.

Return Type

Returns a reference to the TrackMarker that was just added to the time line.

Remarks

The code below adds 3 markers to the track control. These markers are placed in the time line at the specified time unit, in this case, at 20, 70, and 90 units of time. Markers can be moved by the user by simply dragging the marker to a new location on the time line.

Example

Dim Marker As TrackMarker  
Set Marker = TrackControl.Markers.Add(20, "0")  
Marker.Caption = "Caption 1"  
TrackControl.Markers.Add 70, "2"  
TrackControl.Markers.Add 90, "3"

See Also

TrackMarkers Collection


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.