Drag point
Drag point
Hi
Firstly sorry for my english
I'm trying to realise this
[URL=http://img706.imageshack.us/i/sanstitrenws.png/]
I managed tu put some point on the picture.
I can drag point but i need to record the position of the point i move.
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.
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.
If someone can help me please
Thank for all
Firstly sorry for my english
I'm trying to realise this
[URL=http://img706.imageshack.us/i/sanstitrenws.png/]
I managed tu put some point on the picture.
I can drag point but i need to record the position of the point i move.
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.
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.
If someone can help me please
Thank for all
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Drag point
Hi Onyx,
Hope this helps!
No problemOnyx wrote:Firstly sorry for my english
This is not the appropriate event to use, you should use OnDragPointToolDragPoint, for example: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.
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
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: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.
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
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Drag point
Hi
thx for your help
I'm using the event "OndragPointToolDragPoint" but with this event my program to record coordonates is always call during the drag so i have a jerk during the drag.
That why i would like call my program after the user stop the drag.
thx for your help
I'm using the event "OndragPointToolDragPoint" but with this event my program to record coordonates is always call during the drag so i have a jerk during the drag.
That why i would like call my program after the user stop the drag.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Drag point
Hi Onyx,
Ok, in that case you can use the OnMouseUp event in a very similar fashion:
Ok, in that case you can use the OnMouseUp event in a very similar fashion:
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_OnMouseUp(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
Dim Index As Integer
Index = TChart1.Series(0).Clicked(X, Y)
If (Index <> -1) And TChart1.Tools.Items(0).Active Then
Me.Caption = CStr(TChart1.Series(0).XValues.Value(Index)) & " - " & _
CStr(TChart1.Series(0).YValues.Value(Index))
End If
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Drag point
Great
Works fine
Thanks a lot for your help
I can do that i want
Works fine
Thanks a lot for your help
I can do that i want
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Drag point
Hi Onyx,
You're very welcome. I'm glad to hear that.
You're very welcome. I'm glad to hear that.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Drag point
Hi
Another question with drag point
I want to disable drag on my chart with a checkbox.
I'm using this event : Tchart1.Tools.items.active='false'
but it's possible to drag objet
What event i need to use to disable drag on tchart
Thank fo your help
Another question with drag point
I want to disable drag on my chart with a checkbox.
I'm using this event : Tchart1.Tools.items.active='false'
but it's possible to drag objet
What event i need to use to disable drag on tchart
Thank fo your help
Re: Drag point
Hello Onyx,
You can use any Mouse Event. I have made an example that I disable dragPoints tool when you click with button right and enable tool when you click with left button of Mouse as you see then:
Could you check if previous code works as you expected?
Thanks,
You can use any Mouse Event. I have made an example that I disable dragPoints tool when you click with button right and enable tool when you click with left button of Mouse as you see then:
Code: Select all
Private Sub TChart1_OnMouseDown(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
If Button = mbLeft Then
TChart1.Tools.Items(0).Active = True
Else
If Button = mbRight Then
TChart1.Tools.Items(0).Active = False
End If
End If
End Sub
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Drag point
I try your exemple but the drag is not disable.
But with this method, i disable drag
Tchart1.Tools.Active=False
Thank for your help
But with this method, i disable drag
Tchart1.Tools.Active=False
Thank for your help
Re: Drag point
Hello Onyx,
Can you please, check again previous code if works as you expected? If previous code still doesn't work, please try to arrange a simple project we run as-is here so we can try to find which is the problem in it.
Thanks,
Using previous method you can disable the tools but all tools you have in the chart and not a determinate tool. Therefore I recommend you, use Tchart1.Tools.Items(x).Active for access to the tool as you want disable. On the other hand, I have checked following code using versions 8 and 2010 of TeeChartActiveX and works fine for me:But with this method, i disable drag
Tchart1.Tools.Active=False
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_OnMouseDown(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
If Button = mbLeft Then
TChart1.Tools.Items(0).Active = True
Else
If Button = mbRight Then
TChart1.Tools.Items(0).Active = False
End If
End If
End Sub
Private Sub TChart1_OnMouseUp(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
Dim Index As Integer
Index = TChart1.Series(0).Clicked(X, Y)
If (Index <> -1) And TChart1.Tools.Items(0).Active Then
Me.Caption = CStr(TChart1.Series(0).XValues.Value(Index)) & " - " & _
CStr(TChart1.Series(0).YValues.Value(Index))
End If
End Sub
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Drag point
Hi
I'm doing something wrong when i use this method : TChart1.Tools.Items(0).Active = False
I can try to use it but with my work, I miss the time.
With my method, i can do what i what so it's ok for me.
I will try to explain what i do like in a previous topic i post here, maybe you will see what i do wrong.
thank for your help
I'm doing something wrong when i use this method : TChart1.Tools.Items(0).Active = False
I can try to use it but with my work, I miss the time.
With my method, i can do what i what so it's ok for me.
I will try to explain what i do like in a previous topic i post here, maybe you will see what i do wrong.
thank for your help
Re: Drag point
Hello Onyx,
Thanks for the information. We will be waiting for you feedback then. Please bear in mind that an example project reproducing the issue would be very helpful for us to be able to provide an accurate answer.
Thanks,
Thanks for the information. We will be waiting for you feedback then. Please bear in mind that an example project reproducing the issue would be very helpful for us to be able to provide an accurate answer.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |