How to turn the richeditcontrol devexpress Delphi 11 page with a code

57 views Asked by At

There is a richeditcontrol component in the devexpress component set. This object adds a standard page, like wordpad. I need to turn this page into landscape orientation using the code. I use rad studio delphi 11.

I tried to do this:

dxRichEditControl1.Document.Sections[0].Page.Landscape := true;

but the page did not turn over.

I accidentally came across "dockorientation", but I can't figure out how to use it, and where to insert it.

I also tried to do this:

var
 orientation: TDockOrientation;

begin

  orientation := doHorizontal;
  dxRichEditControl1.DockOrientation := orientation;
1

There are 1 answers

0
Mehanizm On

I did it! I used "landscape" in the "form.create" block, but I should have used "form.show".

procedure TFReports.FormShow(Sender: TObject);
begin
  dxRichEditControl1.Document.Sections[0].Page.Landscape := true;
end;