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

TdxRichEditControlBase.OnDocumentClosing Event

In This Article

Enables you to respond to an attempt to close a document with unsaved changes.

#Declaration

Delphi
property OnDocumentClosing: TCloseQueryEvent read; write;

#Remarks

This event occurs every time the opened document with unsaved changes is about to be replaced with another document. Handle this event to save the document before it closes or prevent the document close operation.

The Sender parameter provides access to the Rich Edit control that raised the OnDocumentClosing event. Cast the parameter value to the TdxRichEditControl class to access all class-specific members of the control.

Assign False or True to the CanClose parameter within an OnDocumentClosing handler to forbid or allow the pending document close operation.

Note

The OnDocumentClosing event can occur only if the DocumentModelModified property is set to True.

See Also