ITChart.OnCursorToolChange
ITChart
property OnCursorToolChange: TTChartOnCursorToolChange;
Type Library
TeeChartx
Description
The OnCursorToolChange event is fired on changing the position of a specified Cursor Tool.
Private Sub Form_Load()
With TChart1
.AddSeries scLine
.Series(0).FillSampleValues 10
.Tools.Add tcCursor
With .Tools.Items(0).asTeeCursor
.FollowMouse = True
.Series = 0
End With
End With
End Sub
Private Sub TChart1_OnCursorToolChange(ByVal Tool As Long, ByVal X As Long, ByVal Y As Long, ByVal XVal As Double, ByVal YVal As Double, ByVal Series As Long, ByVal ValueIndex As Long)
If Tool = 0 Then
If Series = 0 Then
Label1.Caption = XVal
Label2.Caption = YVal
End If
End If
End Sub