Hi
I need to be able to remove the drawhandles from a drawline tool programatically. Is this possible?
Also, I have drawlines that I have labeled with the annotation tool. Is it possible to have the annotations move with the drawline when I scroll the chart?
Regards,
Ross
Drawlines Tool
Hello Rossmc,
to the first part of your question:
The idea is to draw a invisible line out of chart and you set the focus on this invisible line, after drawing.
For the second part of your question:
Use annotation property "bound" to move with the cursor.[/quote]
to the first part of your question:
try this:I need to be able to remove the drawhandles from a drawline tool programatically. Is this possible?
Code: Select all
TChart1.Tools.Items(0).asDrawLine.AddLine -1000, -1000, -1000, -1000
TChart1.Tools.Items(0).asDrawLine.Selected = 0
For the second part of your question:
Code: Select all
With TChart1.Tools.Items(0).asDrawLine
.Lines.Items(.Lines.Count - 1).EndPos.X = TChart1.Axis.Bottom.CalcPosPoint(TChart1.Tools.Items(1).asAnnotation.Left)
.Lines.Items(.Lines.Count - 1).EndPos.Y = TChart1.Axis.Left.CalcPosPoint(TChart1.Tools.Items(1).asAnnotation.Top)
End With
TChart1.Repaint
Best regards
Alex
Steema Crew
Alex
Steema Crew