Sizing the Standard Preview
I just want to be able to make the standard preview fit nicely on my users'
screens.
Unfortunately the PreviewForm doesn't exist before I start printing (Device
= dtScreen; Print) and the OnPreviewFormCreate event doesn't seem to get
called.
Is there a way round this?
Ian Butterworth
screens.
Unfortunately the PreviewForm doesn't exist before I start printing (Device
= dtScreen; Print) and the OnPreviewFormCreate event doesn't seem to get
called.
Is there a way round this?
Ian Butterworth
This discussion has been closed.
Comments
describes lost event handlers. You'll need to reassign the
OnPreviewFormCreate event handler after the template is loaded.
procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
begin
ppReport1.PreviewForm.WindowState := wsMaximized;
TppViewer(ppReport1.PreviewForm.Viewer).ZoomSetting := zs100Percent;
end;
Note: You will need to add ppViewr to the uses clause of your unit,
so that the ZoomSetting enumerated type is recognized by the
compiler.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com