Hi Onyx,
Onyx wrote:Firstly sorry for my english
No problem
Onyx wrote:For this i want to use the event "OnEndDrag" to call a program to record position.
But The even don't realize.
I don't know why.
This is not the appropriate event to use, you should use OnDragPointToolDragPoint, for example:
Code: Select all
Private Sub Form_Load()
TChart1.AddSeries scPoint
TChart1.Series(0).FillSampleValues 10
TChart1.Tools.Add tcDragPoint
TChart1.Tools.Items(0).asDragPoint.Series = TChart1.Series(0)
End Sub
Private Sub TChart1_OnDragPointToolDragPoint(ByVal Index As Long)
Me.Caption = CStr(TChart1.Series(0).XValues.Value(Index)) & " - " & _
CStr(TChart1.Series(0).YValues.Value(Index))
End Sub
Onyx wrote:Second problem
The position of the point in top are (70,70), i set (0,100) for minmax for X and Y but with the event "OnSeriesClickPointer", i don' recover the values.
Having a DragPoint tool assigned to the series will "mask" the OnSeriesClickPointer event so it won't be fired. If the DragPoint tool is not assigned then you should do almost the same as in the DragPoint tool event:
Code: Select all
Private Sub Form_Load()
TChart1.AddSeries scPoint
TChart1.Series(0).FillSampleValues 10
End Sub
Private Sub TChart1_OnSeriesClickPointer(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, ByVal X As Long, ByVal Y As Long)
Me.Caption = CStr(TChart1.Series(0).XValues.Value(ValueIndex)) & " - " & _
CStr(TChart1.Series(0).YValues.Value(ValueIndex))
End Sub
Hope this helps!