NtTimeChartControl.ScrollToDt Method

Scrolls the Time Chart to the point of time you specify as a parameter. Actually it is not an animated scrolling. Instead it simply jumps to the specified time stamp. You can specify the X-Coordinate of the point where you want this time stamp to be located (e.g. on the left edge of the client area or in the middle).
 
Calling this method is the correct approach to move the Time Chart, rather than setting its AutoscrollPosition member to another value. Reason: Calling this member allows you to move to any date, not only those dates that are covered by the current scroll range. In addition this method also moves the Header Control and Flank Controls (if any) along with the main chart.

Overload List:

Modifier / Return Value Name and Parameters Description

public void

ScrollToDt ( DateTime dt, int x )

 
Moves the time stamp specified by dt to the client X-coordinate x. This method keeps the vertical scroll position.

public void

ScrollToDt ( DateTime dt, int x, int y )

Moves the time stamp specified by dt to the client X-coordinate x. In addition the Y-Coordinate to scroll to is also specified.

Return value:

void

Parameters:

DateTime dt
The time stamp.

int x
The client area X-Coordinate where you want to locate the point in time dt.

int y
The vertical scroll position.

Remarks:

You can provide a DateTime object in local time or UTC. This method will internally convert it to UTC in any case.