Back to Devexpress

IdxRichEditDocument.Protect(string) Method

vcl-dxrichedit-dot-nativeapi-dot-idxricheditdocument-dot-protect-x28-system-dot-string-x29.md

latest1.5 KB
Original Source

IdxRichEditDocument.Protect(string) Method

Enforces the opened document’s password protection from accidental changes.

Declaration

delphi
procedure Protect(const APassword: string);

Parameters

NameType
APasswordstring

Remarks

Invoke this procedure to protect the document with a password passed as the APassword parameter. If the document protection is enabled, only the user whose name is assigned to a range permission’s UserName property can edit the respective document range. Calling the Unprotect procedure cancels the active document protection.

To identify whether the document is protected from changes, use the IsDocumentProtected property.

An end-user can assign a protection password to the document via the Start Enforcing Protection dialog invoked by the ProtectDocument command.

See Also

IdxRichEditDocument Interface

IdxRichEditDocument Members

dxRichEdit.NativeApi Unit