Skip to main content

TdxRichEditControlBase.OnDocumentClosing Event

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

Declaration

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