How to display Image in Annotation Tool at Runtime - Urgent

TeeChart for ActiveX, COM and ASP
Post Reply
Nitin
Newbie
Newbie
Posts: 7
Joined: Thu Jan 09, 2003 5:00 am

How to display Image in Annotation Tool at Runtime - Urgent

Post by Nitin » Wed Aug 03, 2005 6:30 am

Hi

I am using TeeChart ActiveX ver 6.0.6 in my application. I am facing one problem since a month. I want to display image in annotation tool.

I can do it at design time or at runtime using chart editor by changing property Format -> Pattern -> Select Image. But at runtime there is no such propert available to annotation tool. Earlier I have raised same problem and the answer I got was to achieve this by using following statement

.asAnnotation.CallOut.Brush.LoadImage

This did not resolve my problem as it shows image in callout object not in main annotation tool object. I have tried to move callout object on the top of annotation tool object but second problem arose. All other annotation objects created after this annotation tool object are displaying image.

Is there any other way to display multiple images in chart without using annotation tool ? Also please tell me why teechart doesn't allow displaying image in main annotation tool object and why it allows to do it at design time or by using editor ? I don't want to use callout object as it doesnot solves my problem.

Please help me as I am stuck up for only this problem and I have to complete it soon.

Thanks

Nitin

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

Post by Pep » Wed Aug 03, 2005 11:42 am

Hi Nitin,
Is there any other way to display multiple images in chart without using annotation tool ?
Yes, you can use the Canvas.Draw method (use it in the OnAfterDraw event) :
i.e. :
TChart1.Canvas.Draw 10, 10, Image1.Picture
Also please tell me why teechart doesn't allow displaying image in main annotation tool object and why it allows to do it at design time or by using editor ? I don't want to use callout object as it doesnot solves my problem.
This is because the TeeChart lack of the properties which allow to do this at runtime (via code). I'll add them for the next maintenance release of the TeeChart Pro v7 ( the v7.06). The code to use would be similar to :
TChart1.Tools.Items(0).asAnnotation.Shape.Brush.LoadImage "c:\..."

Post Reply