TSRichViewEdit.Format, Reformat

<< Click to display table of contents >>

TSRichViewEdit.Format, Reformat

The methods format the document completely. Only formatted documents can be displayed or edited. In addition, this methods copy properties (document size, margins, etc.) from RichViewEdit.DocParameters to PageProperty.

procedure Format;

procedure Reformat;

The difference between these methods is the following. Format does not require document to be formatted before its call, and it moves the caret to the beginning. Reformat can be called only if the document is already formatted, and it keeps the selection and the caret position.

Format/Reformat do the following work:

loads header and footer from Subdocuments to RVHeader and RVFooter

SetRVMargins(True/False).

paginates the document

Call Format after loading files in RichViewEdit.

Call Reformat after calling SetIntPropertyEd(..., False)/SetFloatPropetyEd(...False).

See also:

Document parts in TSRichViewEdit