Skip to main content

TdxRichEditControlBase.DocumentModelModified Property

Specifies if the opened document has unsaved changes.

Declaration

property DocumentModelModified: Boolean read; write;

Property Value

Type
Boolean

Remarks

You can use this property to track and reset a document’s content state. If the DocumentModelModified property is set to True, the control treats the opened document as “modified” (that is, has unsaved changes). For instance, the OnDocumentClosing event can occur only if the DocumentModelModified property is set to True.

The DocumentModelModified property automatically switches between False and True changes when:

  • A new content change is made in a document (True).

  • The Undo command rolls back the first unsaved change (False).

  • The Redo command restores an unsaved change (True).

  • A new or imported document replaces the current document (False).

  • A document with pending changes is saved to file (False).

The DocumentModelModified property value never changes to False in response to a document save operation that is not related to the opened document’s state (for instance, when you save a copy of the opened document to a stream).

Note

The OnModifiedChanged event occurs every time the DocumentModelModified property value changes.

See Also