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

IdxRichEditSubDocument.EndUpdateParagraphs(IdxRichEditParagraphProperties) Method

Applies the pending paragraph property changes initiated by a BeginUpdateParagraphs function call.

#Declaration

Delphi
procedure EndUpdateParagraphs(const AProperties: IdxRichEditParagraphProperties);

#Parameters

Name Type Description
AProperties IdxRichEditParagraphProperties

The paragraph properties created by a BeginUpdateParagraphs function call.

#Remarks

A BeginUpdateCharacters function call obtains properties of one or more paragraphs to which the target document range belongs. The EndUpdateParagraphs procedure accepts these paragraph settings and applies the changes made between BeginUpdateParagraphs and EndUpdateParagraphs calls.

#Code Example: Customize Paragraph Settings

The following code example justifies the paragraph where the caret is located and sets a 2-centimeter first line indent:

var
  ADocument: IdxRichEditDocument;
  AParagraphProperties: IdxRichEditParagraphProperties;
begin
  ADocument := dxRichEditControl1.Document;
  ADocument.&Unit := TdxRichEditDocumentUnit.Centimeter;
  // Obtains properties of the paragraph where the caret is located
  AParagraphProperties := ADocument.BeginUpdateParagraphs(ADocument.Selection);
  AParagraphProperties.Alignment := TdxRichEditParagraphAlignment.Justify;
  AParagraphProperties.FirstLineIndentType := TdxRichEditParagraphFirstLineIndent.Indented;
  AParagraphProperties.FirstLineIndent := 2;
  ADocument.EndUpdateParagraphs(AParagraphProperties); // Applies the changes to the current paragraph
end;

See Also