Multiple tcCursor tools

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

Multiple tcCursor tools

Post by Rossmc » Tue Jun 17, 2008 8:57 am

Using v7 of ActiveX control.

Is it possible to add two tcCursor tools, both with style = vertical?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jun 17, 2008 9:07 am

Hi Rossmc,

Yes, this is possible. You may want to associate them to different series.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Rossmc
Newbie
Newbie
Posts: 23
Joined: Thu Mar 30, 2006 12:00 am

Nevrmind

Post by Rossmc » Tue Jun 17, 2008 10:47 am

Sorry - Never mind. I was being a little stupid.


Hi

Here is what I did:
.AddSeries scLine
.Series(0).FillSampleValues 260
l = .Tools.Add(tcCursor)
.Tools.Items(l).asTeeCursor.Style = cssVertical

With just the above code the cursor appears. If I then attempt to add a second cursor, neither appear?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jun 17, 2008 11:22 am

Hi Rossmc,

This is most likely because second cursor tool overlaps with the first one. You should set tool's x and y values, for example:

Code: Select all

    TChart1.Tools.Items(0).asTeeCursor.XVal = 5
    TChart1.Tools.Items(0).asTeeCursor.YVal = 10
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply