Dear Pep
I've discovered by chance that there is a fantastic drag point tool in V7 (I did not find anything about it in the V7 demo) which I could use, and which would be great help for me. Unfortunately by checking out the Tutorial, and by clicking on GetlDsOfNames property (or method?) the tutorial tells me: "del5vcl.hlp cannot be found or missing"
My question: where I could learn more about the pont drag tool? What methods, poroperties it has, etc.
What I would like to do: I have a closed polygon formed by line series points. I would like to move it using the drag point tool by clicking on a single point of the polygon, and all the other points should move in concert with the clicked point. How could I do this?
Tx in advance, best regards
Andras
drag point tool
Hi Andras,
Yes, you're correct, I'll add one example into it. Thanks for the advise.I've discovered by chance that there is a fantastic drag point tool in V7 (I did not find anything about it in the V7 demo)
Yes, I can see, the problem is that thei method should not be showed as it's not available to use it. We'll remove it from the help.by checking out the Tutorial, and by clicking on GetlDsOfNames property (or method?) the tutorial tells me: "del5vcl.hlp cannot be found or missing"
This tool only have the DragStyle and Series properties.My question: where I could learn more about the pont drag tool? What methods, poroperties it has, etc.
Well, this should be easy to do using the OnDragPoint event but I've noticed that it has not been added. I'll add for the next maintenance release which will be ready soon. In meantime the only way around this that I can think of could be checking if any of the points (values) has been changed after the Chart is repainted, and if so update the values for the other points.What I would like to do: I have a closed polygon formed by line series points. I would like to move it using the drag point tool by clicking on a single point of the polygon, and all the other points should move in concert with the clicked point. How could I do this?
Pep Jorge
http://support.steema.com
http://support.steema.com
Pep maybe you could elaborate this polygon movement example as an example for the point drag tool, and put it into the demo upgrade. I think it might be useful for many other TChart users.Well, this should be easy to do using the OnDragPoint event but I've noticed that it has not been added. I'll add for the next maintenance release which will be ready soon. In meantime the only way around this that I can think of could be checking if any of the points (values) has been changed after the Chart is repainted, and if so update the values for the other points.
Tx, regards
Andras
H Andras,
yes, an exmaple will be included, but in your case, I'm not sure what're you refereincing when you say "all the other points should move in concert with the clicked point". You mean that if I drag a point and their values has increased for example +2 then the others should be incremented with +2 ?
yes, an exmaple will be included, but in your case, I'm not sure what're you refereincing when you say "all the other points should move in concert with the clicked point". You mean that if I drag a point and their values has increased for example +2 then the others should be incremented with +2 ?
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Pep
Yes, exactly. So if I move move (drag) one point of the polygon, all the others should also move with the same extent, i.e. in this way the whole polygon moves. And because all points move in concert with the clicked (dragged) one, the polygon does not get distorted during the drag, it keeps shape. That would be something, which would be very useful. You could also include two option buttons into the example, one for polygon move (drag) as described above, and one for single point drag, where only one single (clicked) point of the polygon should move (and of course the polygon gets distorted, as the single point moves.)
best regards
Andras
Yes, exactly. So if I move move (drag) one point of the polygon, all the others should also move with the same extent, i.e. in this way the whole polygon moves. And because all points move in concert with the clicked (dragged) one, the polygon does not get distorted during the drag, it keeps shape. That would be something, which would be very useful. You could also include two option buttons into the example, one for polygon move (drag) as described above, and one for single point drag, where only one single (clicked) point of the polygon should move (and of course the polygon gets distorted, as the single point moves.)
best regards
Andras
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi Andras,
TeeChart Pro v7 ActiveX\Examples\Visual Basic\Visual Basic 5 & 6\Dragging Points ?
You should easily be able to adapt this example to move all the points of your polygon rather than just one of them.
Have you seen the VB6 example under:Yes, exactly. So if I move move (drag) one point of the polygon, all the others should also move with the same extent, i.e. in this way the whole polygon moves. And because all points move in concert with the clicked (dragged) one, the polygon does not get distorted during the drag, it keeps shape. That would be something, which would be very useful. You could also include two option buttons into the example, one for polygon move (drag) as described above, and one for single point drag, where only one single (clicked) point of the polygon should move (and of course the polygon gets distorted, as the single point moves.)
TeeChart Pro v7 ActiveX\Examples\Visual Basic\Visual Basic 5 & 6\Dragging Points ?
You should easily be able to adapt this example to move all the points of your polygon rather than just one of them.
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Hi,
one example could be :
one example could be :
Code: Select all
Dim YPointValues(5) As Integer
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scLine
For i = 0 To 5
YPointValues(i) = Rnd * 100
Next i
.Series(0).AddArray i, YPointValues
.Series(0).asLine.Pointer.Visible = True
.Axis.Left.SetMinMax -100, 200
.Tools.Add tcDragPoint
.Tools.Items(0).asDragPoint.Series = .Series(0)
.Tools.Items(0).asDragPoint.DragStyle = dsY
Check1.Value = 1
End With
End Sub
Private Sub TChart1_OnDragPointToolDragPoint(ByVal Index As Long)
Dim Value
Value = YPointValues(Index) - TChart1.Series(0).YValues.Value(Index)
Label1.Caption = Index
For i = 0 To TChart1.Series(0).Count - 1
If i <> Index Then
TChart1.Series(0).YValues.Value(i) = YPointValues(i) - Value
End If
Next i
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi ChrisChristopher Ireland wrote:Hi Andras,
Have you seen the VB6 example under:
TeeChart Pro v7 ActiveX\Examples\Visual Basic\Visual Basic 5 & 6\Dragging Points ?
You should easily be able to adapt this example to move all the points of your polygon rather than just one of them.
Yes I remember this example, but this is not based on the drag point tool, but rather on the OnMouseMove event.
Tx anyway, best regards
Andras