Setting print margins right

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
TheRoadrunner
Newbie
Newbie
Posts: 17
Joined: Thu Dec 07, 2006 12:00 am
Location: Sønderborg, Denmark

Setting print margins right

Post by TheRoadrunner » Thu Jun 28, 2007 5:08 am

Hi

When a user hits print on my Chart form, I present a TPageSetupDialog allowing the user to select printer, paper, orientation and margins.
The margins returned from TPageSetupDialog are measured in 1/100 milimeters.
How do I translate that into Chart.PrintMargins (measured in pixels) :?:
I use the approach of rescaling my chart before print to fit the printer dimensions and set PrintProportional := False.

Best regards

Søren

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

Post by Narcís » Thu Jun 28, 2007 8:34 am

Hi Søren,

You can try using what Pep suggested here. You may also be interested reading the article I posted about printing.

Thanks in advance.
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

TheRoadrunner
Newbie
Newbie
Posts: 17
Joined: Thu Dec 07, 2006 12:00 am
Location: Sønderborg, Denmark

Post by TheRoadrunner » Thu Jun 28, 2007 11:22 am

Thank you Narcís.

I decided to go for the Chart.TeeCreateMetafile(..) solution and position things myself.

Best
Søren

Post Reply