Sets new range selection position.
Visual Basic (Declaration) | |
---|---|
Public Sub SetSelectionPosition( _ ByVal newStart As Double, _ ByVal newEnd As Double _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
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.
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.
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