Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TCustomdxComponentPrinter.PreviewWindowForm Property

Provides access to the Print Preview dialog.

#Declaration

Delphi
property PreviewWindowForm: TForm read;

#Property Value

Type
TForm

#Remarks

The UI of the Print Preview dialog referenced by this property includes a toolbar with different buttons and controls and a report preview provided by the TdxPSPreviewWindow component, which is accessible via the PreviewWindow property.

The following code shows how to handle the OnBeforePreview event and customize the size of the Print Preview dialog using the PreviewWindowForm sub-properties prior to displaying it.

Delphi
procedure TForm1.dxComponentPrinter1BeforePreview(Sender: TObject);
begin
  with dxComponentPrinter1.PreviewWindowForm do
  begin
    Left := 10;
    Width := 250;
    Height := 250;
    Top := 50;
  end;
end;
See Also