print Chart + TImage

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Copeau
Newbie
Newbie
Posts: 9
Joined: Tue Jan 24, 2006 12:00 am

print Chart + TImage

Post by Copeau » Mon Mar 06, 2006 11:17 am

Hi there,

just a quick question: is it possible to use the chart previewer and the chart printing funcitons (working very well :) ) to print my chart AND an image wich is over the chart in my form ?

(I use a timage instead of the tool image because i need to use events like OnMouse---...)

thank you

C.

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 Mar 17, 2006 12:42 pm

Hi Copeau,

You could try using something like the code below where Image1 is a TImage.

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  ChartPreviewer1.Execute;
end;

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

procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
  Chart1.Canvas.Draw(100,100,Image1.Picture.Graphic);
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

Copeau
Newbie
Newbie
Posts: 9
Joined: Tue Jan 24, 2006 12:00 am

Post by Copeau » Fri Mar 17, 2006 1:07 pm

hmmm
yes i'll try.

Can i do that just at print time, and clear it immediately after ?

Post Reply