Skip to main content

IdxRichEditSubDocument.Delete(IdxRichEditDocumentRange) Method

Deletes the specified text range from the document.

Declaration

procedure Delete(const ARange: IdxRichEditDocumentRange);

Parameters

Name Type Description
ARange IdxRichEditDocumentRange

The deleted document range.

Remarks

Call the Delete procedure to delete a document range.

Example

The following code example deletes all selected text ranges:

var
  ADocument: IdxRichEditDocument;
  I: Integer;
begin
  ADocument := dxRichEditControl1.Document;
  ADocument.BeginUpdate;
  for I := ADocument.Selections.Count - 1 downto 0 do // Iterates through all selected document ranges
    ADocument.Delete(ADocument.Selections[I]);
  ADocument.EndUpdate;  // Applies all pending changes to the document and unlocks document updates
end;

Selected Document Ranges Deletion Example

See Also