Annotation draw

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
kmanuele
Newbie
Newbie
Posts: 24
Joined: Wed Jan 12, 2005 5:00 am

Annotation draw

Post by kmanuele » Thu May 12, 2005 9:05 pm

I am using a Annotation tool as a footer, with custom positioning. The position is set initially on chart creation, and whenever the chart is resized.

The tool is not displayed when the chart is first displayed, even though the OnResize() event is triggered. The reason is that the tool->Shape height is 1, even though there are three lines of text in the tool.

If the user then manually resizes the form (by any method), the tool is displayed, and stays in the correct location.

I tried OnAfterDraw, OnBeforeDrawSeries, and other events, but tool dimensions seem to be established after these events.

??

Kevin

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

Post by Narcís » Fri May 13, 2005 7:55 am

Hi Kevin,

Could you please send us an example we can run "as-is" to reproduce the problem here? You can post it at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Also notice that TChart already has it's own footer which admits custom positioning, you could use it instead of TAnnotationTool. You can add a footer to your chart using the chart editor, "Titles" tab, selecting "Foot" in the left top listbox and finally select "Position" tab to set a custom position.
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

kmanuele
Newbie
Newbie
Posts: 13
Joined: Mon Feb 09, 2004 5:00 am

Post by kmanuele » Sat May 14, 2005 10:01 pm

Thanks

Sample code is posted.

I am aware of the TChart footer, but this text needs to be set and located programatically -- not by the user, and it needs to appear when the chart is displayed.

Note that the annotation tool displays correctly at first chart display when custom positioning is false.

Kevin

Post Reply