Dundas Chart for Windows Forms
SetCursorPosition Method
See Also  Send comments on this topic.
DundasWinChart Assembly > Dundas.Charting.WinControl Namespace > Cursor Class : SetCursorPosition Method


newPosition
The new position of the cursor.  Measured as a value along the relevant axis.
New cursor position as axis value.
This method sets the position of a cursor within a chart area at a given axis value.
Sets new cursor position.

Syntax

Visual Basic (Declaration)  
Public Sub SetCursorPosition( _
   ByVal newPosition As Double _
) 
Visual Basic (Usage) Copy Code
Dim instance As Cursor
Dim newPosition As Double
 
instance.SetCursorPosition(newPosition)
C#  
public void SetCursorPosition( 
   double newPosition
)

Parameters

newPosition
The new position of the cursor.  Measured as a value along the relevant axis.
New cursor position as axis value.

Remarks

This method sets the position of a cursor along the relevant axis (i.e. the X axis cursor, set by the CursorX property, is set as an X axis value).

This method has a very important difference compared to the SetCursorPixelPosition method, in that SetCursorPixelPosition uses pixel coordinates that are relative to the entire chart image, while SetCursorPosition sets a cursor using an axis value within a chart area.

The Position property can also be used to display a cursor at a given location.

Note that the interval-related properties have no effect when setting the position of a cursor using this method.

To programmatically remove a cursor set the position of the cursor to Double.NaN using this method. 

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2009 All Rights Reserved.