Check to see if chart has annotation tool...

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
tbonejo
Newbie
Newbie
Posts: 73
Joined: Wed Sep 06, 2006 12:00 am
Contact:

Check to see if chart has annotation tool...

Post by tbonejo » Thu Nov 16, 2006 1:27 pm

Is there a way to see if a chart contains an annotation tool that can be accessed?

Thanks,

Tom
Tom

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

Post by Narcís » Thu Nov 16, 2006 4:17 pm

Hi Tom,

Yes, you can do something like this:

Code: Select all

  for i := 0 to Chart1.Tools.Count - 1 do
    if (Chart1.Tools.Items[i] is TAnnotationTool) then
      With (Chart1.Tools.Items[i] as TAnnotationTool) do
      begin
        //Do something
      end;
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

tbonejo
Newbie
Newbie
Posts: 73
Joined: Wed Sep 06, 2006 12:00 am
Contact:

Post by tbonejo » Thu Nov 16, 2006 4:55 pm

Thanks that works great.
Tom

Post Reply