Page 1 of 1

TeePreviewPanel ignores PrintMargins - updated

Posted: Sun Jul 24, 2005 11:34 am
by 9234468
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

Posted: Mon Aug 01, 2005 10:40 am
by Pep
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;

Posted: Wed Aug 03, 2005 8:22 pm
by 9234468
there was critical to set PrintProportional to False. But description of this property doesn't correrspond with its real function...