Drawlines Tool

TeeChart for ActiveX, COM and ASP
Post Reply
Rossmc
Newbie
Newbie
Posts: 23
Joined: Thu Mar 30, 2006 12:00 am

Drawlines Tool

Post by Rossmc » Thu Aug 03, 2006 9:22 am

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

stark
Newbie
Newbie
Posts: 10
Joined: Wed Jul 26, 2006 12:00 am
Location: Girona / Catalunya

Post by stark » Thu Aug 03, 2006 11:23 am

Hello Rossmc,

to the first part of your question:
I need to be able to remove the drawhandles from a drawline tool programatically. Is this possible?
try this:

Code: Select all

TChart1.Tools.Items(0).asDrawLine.AddLine -1000, -1000, -1000, -1000
TChart1.Tools.Items(0).asDrawLine.Selected = 0
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:

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
Use annotation property "bound" to move with the cursor.[/quote]
Best regards
Alex

Steema Crew

Post Reply