Teechart Annotation Refresh

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Luis
Newbie
Newbie
Posts: 1
Joined: Tue Oct 07, 2003 4:00 am

Teechart Annotation Refresh

Post by Luis » Wed Mar 10, 2004 4:16 pm

I have a problem with the Teechart annotation. This is what happens:

I add some annotations (2-5) on-the-fly which all display correctly. My chart is on one of the pages of a PageControl component. When I go to another Page on the page control and come back, all the annotations but one are missing!

I've made a number of attempts to correct this and nothing seems to help. (Repaints, re-assign parentchart, reposition, to name a few)

Has anyone seen this or have a suggestion?

Thanks for your help.

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Mar 18, 2004 10:51 am

Hi Luis,

which TeeChart Pro version are you using ? Also, how're you creating the Annotations ?
I've tried here using the TeeChart Pro v6.01 and v7 and works fine, they are visible even if I go to another page. I've used the following code :

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues(5);
end;

procedure TForm1.BitBtn2Click(Sender: TObject);
var tmpStr: String;
begin
  tmpStr := InputBox('ANNOTATION','Enter your Annotation','ANNOTATION');
  with (Chart1.Tools.Add(TAnnotationTool.Create(Chart1)) as TAnnotationTool)
do
  begin
    ParentChart := Chart1;
    Text := tmpStr;
    Shape.CustomPosition := True;
    Shape.Left := strtoint(edit1.Text);
    Shape.Top := strtoint(edit2.Text);
  end;
end;
If you still having problems let me know and I'll post one example to the steema.public.attachments newsgroups so you can check if it works for you.

Post Reply