Skip to main content
A newer version of this page is available. .

TdxRichEditControlNewDocument Class

An action object that corresponds to the NewDocument command provided by the Rich Edit control.

Declaration

TdxRichEditControlNewDocument = class(
    TdxRichEditControlAction
)

Remarks

This class does not introduce any new public members. Executing the TdxRichEditControlNewDocument action object does the following:

  • Closes the currently opened document and fires the OnDocumentClosing event;

  • Creates a new blank document, raising the OnEmptyDocumentCreated event.

UI elements linked to a TdxRichEditControlNewDocument action object are enabled only if the Rich Edit control’s Options.Behavior.CreateNew property is set to TdxDocumentCapability.Default or TdxDocumentCapability.Enabled.

To localize the caption and hint displayed by UI elements linked to a TdxRichEditControlNewDocument action object, use the sdxRichEditCommandNewEmptyDocumentMenuCaption and sdxRichEditCommandNewEmptyDocumentMenuDescription resource strings, respectively.

Note

Calling the CreateNewDocument function with True passed as its ARaiseDocumentClosing parameter is equivalent to executing the TdxRichEditControlNewDocument action object.

See Also