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


newStart
The new starting position of the range selection.  Measured as a value along the relevant axis.
New selection start position.
newEnd
The new ending position of the range selection.  Measured as a value along the relevant axis.
New selection end position.
This method sets the position of a selected range within a chart area at given axis values.
Sets new range selection position.

Syntax

Visual Basic (Declaration)  
Public Sub SetSelectionPosition( _
   ByVal newStart As Double, _
   ByVal newEnd As Double _
) 
Visual Basic (Usage) Copy Code
Dim instance As Cursor
Dim newStart As Double
Dim newEnd As Double
 
instance.SetSelectionPosition(newStart, newEnd)
C#  
public void SetSelectionPosition( 
   double newStart,
   double newEnd
)

Parameters

newStart
The new starting position of the range selection.  Measured as a value along the relevant axis.
New selection start position.
newEnd
The new ending position of the range selection.  Measured as a value along the relevant axis.
New selection end position.

Remarks

This method sets the start and end positions of a range selection along the relevant axis (i.e. the X axis cursor, represented by the CursorX property, is used to set the range selection along the X axis).

This method has a very important difference compared to the SetSelectionPixelPosition method, in that SetSelectionPixelPosition uses pixel coordinates that are relative to the entire chart image, while SetSelectionPosition sets a range selection using axis values within a chart area.

If an axis value is specified that is greater than the maximum value or smaller than the minimum axis value then the range selection will stop at the relevant chart area boundary. 

To implement range selection using another mouse button (or the SHIFT, ALT or CTRL keys) use SetSelectionPixelPosition instead of SetSelectionPosition for ease of use.

To programmatically remove a range selection set the beginning and end points of the range 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.