CursorChange Event

Measurement Studio User Interface

CursorChange Event

Syntax

Sub ControlName_CursorChange( CursorIndex As Long, XPos As Variant, YPos As Variant, bTracking As Boolean)

Applies To

CWGraph

Purpose

Generated when you reposition a cursor with the mouse.

Remarks

This event is generated only when TrackMode is set to cwGTrackDragCursor.

Parameters

CursorIndex As Long

The index of the cursor (one-based).

XPos As Variant

The X position of the cursor.

YPos As Variant

The Y position of the cursor.

bTracking As Boolean

True if the mouse was pressed when the event occurred.

Example

Private Sub CWGraph1_CursorChange(CursorIndex As Long, XPos As Variant, YPos As Variant, bTracking As Boolean)
    'Store the new X and Y position of the cursor
    xDisplay = XPos
    yDisplay = YPos
End Sub