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.
Teechart Annotation Refresh
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 :
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.
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;
Pep Jorge
http://support.steema.com
http://support.steema.com