TeePreviewPanel ignores PrintMargins - updated

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
ungos
Newbie
Newbie
Posts: 12
Joined: Mon Oct 04, 2004 4:00 am
Location: Czech Republic
Contact:

TeePreviewPanel ignores PrintMargins - updated

Post by ungos » Sun Jul 24, 2005 11:34 am

TeePreviewPanel.Panel := FChart;
TeePreviewPanel.PrintMargins := Rect(3, 3, 3, 3); // %
FChart.PrintMargins := TeePreviewPanel.PrintMargins;
TeePreviewPanel.Print;

after Print, FChart.PrintMargins are set to values according to visible margins on TeePreviewPanel. TeePreviewPanel.PrintMargins does'nt change its values, but they are also ignored during Print. Print result depends only on visible form of TeePreviePanel.

I've no idea how to programatically change margins displayed on TeePreviewPanel.

Using Teechart 7.04 VCL, Delphi 7 Personal.

Update:

that's seems to be some bug in VCL:
if some margin on TeePreviewPanel is dragged by mouse prior to changing margins by program, all following margins changes functions as expected

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

Post by Pep » Mon Aug 01, 2005 10:40 am

Hi,

to change the margins of the TeePreviewPanel you must use similar code to the following :

Code: Select all

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
 Chart1.PrintProportional := false;
 Chart1.PrintMargins:=Rect(3,3,3,3);
 TeepreviewPanel1.Panels.Clear;

 TeePreviewpanel1.Panels.Add(chart1);
 TeePreviewpanel1.Refresh;
end;

ungos
Newbie
Newbie
Posts: 12
Joined: Mon Oct 04, 2004 4:00 am
Location: Czech Republic
Contact:

Post by ungos » Wed Aug 03, 2005 8:22 pm

there was critical to set PrintProportional to False. But description of this property doesn't correrspond with its real function...

Post Reply