Hi,
I upgraded from TeeChartProv5 to v6. The only compile error in my old v5 code so far is with ChartPreview.
I like to run the following code:
uses TeeEdiGene;
With Chart1 do
begin
PrintProportional:=False;
PrintMargins:=Rect(5,5,5,5);
PrintResolution:=-50;
PrintOrientation(poLandscape);
end;
ChartPreview(Main_form,Chart1);
My questions:
1) The uses clause was TeePrevi, and still is according to the tutorial. But then ChartPreview is unknown.
2) PrintOrientation(poLandscape); is also copy/pasted from the tutorial, but poLandscape is unknown. I actually want to use poPortrait. TeeProcs is in my uses list. How to solve this ?
Thanks for your help !
Gerben
ChartPreview
Hi.
ChartPreview routine is declared and implemented in TeeEdiGene unit. The following code, tested with Delphi 6 and TeeChart 6.01, works just fine:The uses clause was TeePrevi
Code: Select all
Uses TeeEdiGene, Printers;
procedure TForm1.Button1Click(Sender: TObject);
begin
With Chart1 do
begin
PrintProportional:=False;
PrintMargins:=Rect(5,5,5,5);
PrintResolution:=-50;
PrintOrientation(poLandscape);
end;
ChartPreview(self,Chart1);
end;
To solve this problem, add the Printers unit to the Uses section.2) PrintOrientation(poLandscape);
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Hi Marjan,
Thanks for the answer, I checked it in Delphi-5 and it worked fine. However it did not completely satisfie my wish.
I have created a chart that definitely has to be printed in portrait mode. Is it possible to bring up ChartPreview with the portrait checkbox checked. Until now landscape is always checked.
I am using Delphi-5 with TeeChart Pro v6.01.
Regards, Gerben
Thanks for the answer, I checked it in Delphi-5 and it worked fine. However it did not completely satisfie my wish.
I have created a chart that definitely has to be printed in portrait mode. Is it possible to bring up ChartPreview with the portrait checkbox checked. Until now landscape is always checked.
I am using Delphi-5 with TeeChart Pro v6.01.
Regards, Gerben
Hi Gerbern,
Printer.Orientation := poPortrait;
yes, you can use :I have created a chart that definitely has to be printed in portrait mode. Is it possible to bring up ChartPreview with the portrait checkbox checked. Until now landscape is always checked.
Printer.Orientation := poPortrait;
Pep Jorge
http://support.steema.com
http://support.steema.com