Home General

Additional control of Preview Form

edited March 2016 in General
Environment: Delphi 10 Seattle, RBE 17.01-b65

Just curious if there's any reasonably simple way of controlling
position of the preview form beyond setting its height and width. I'd
like to be able to position it at a particular location on the screen,
and have tried doing so in several different events, but evidently, RB
insists on opening the form window at screen center.

Thanks for any suggestions.

Comments

  • edited March 2016
    Hi Howard,

    Use the Report.OnPreviewFormCreate event to change the TPosition and
    location of the preview form using the Report.PreviewForm property.

    For instance...

    procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
    begin
    ppReport1.PreviewForm.Position := poDesigned;
    ppReport1.PreviewForm.Left := 0;

    end;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2016
    Thanks, Nico,

    That was a "DUH!" moment. I didn't even think of the Position property
    for the preview form. Say what?

    Cheers!

This discussion has been closed.