Page 1 of 1

Drag Point Tools ?

Posted: Wed Apr 05, 2006 11:48 am
by 9530613
Hello Support Team,

I added in chart the DragPoint Tools. I want to process event of the end of drag. How to make it ?

Best regards, Rustam.

Posted: Wed Apr 05, 2006 11:59 am
by narcis
Hi Rustam,

An specific event for that doesn't exist but you can easily achieve that by using TeeChart's OnMouseUp event and the series Clicked method as shown here:

Code: Select all

Private Sub TChart1_OnMouseUp(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
    If (TChart1.Series(0).Clicked(X, Y) <> -1) Then
        MsgBox "Point Dragged!"
    End If
End Sub

Posted: Wed Apr 05, 2006 1:44 pm
by 9530613
narcis wrote: An specific event for that doesn't exist but you can easily achieve that by using TeeChart's OnMouseUp event and the series Clicked method as shown here:
Alas! It not quite that. I have event each time when the cursor is crossing the series line.

Posted: Wed Apr 05, 2006 2:00 pm
by narcis
Hi Kabal,

It works fine here, it only fires after a series point has been clicked and the mouse button is released. Are you sure that you didn't implement the code in the OnMouseMove event instead of OnMouseUp?

Posted: Thu Apr 06, 2006 3:37 am
by 9530613
narcis wrote:Hi Kabal,

It works fine here, it only fires after a series point has been clicked and the mouse button is released. Are you sure that you didn't implement the code in the OnMouseMove event instead of OnMouseUp?
It's not working when You have started drag from "clicked" point in the Series but have stopped drag on free region. Then Clicked return -1 however the point have been moved.

Best regards, Rustam.

Posted: Tue Apr 11, 2006 9:52 am
by Pep
Hi Rustam,

yes, in that case, if you want to control this you will have to use the OnMouseDown, OnMouseMove and OnMouseUp events checking on these ones which point was clicked when the mouse is released.