vcl-dxrichedit-dot-control.md
A Rich Edit control.
TdxRichEditControl = class(
TdxCustomRichEditControl
)
The TdxRichEditControl component is designed to create an application with a user experience inspired by Microsoft Word®.
The list below outlines key members of the TdxRichEditControl class. These members allow you to modify control appearance and behavior as well as manage documents.
ActiveViewProvides access to the active document View.ActiveViewTypeAllows you to switch between document Views.BorderStyleAllows you to switch between available border styles.OnActiveViewChangedAllows you to track document View changes.OnGetAICommands
Allows you to modify the list of AI-powered commands available to users.
Note
The OnGetAICommands event can occur only if an AI service provider is registered and AI user commands are initialized.
OnReadOnlyChangedAllows you to track read-only status changes.OptionsProvides access to general appearance and behavior settings (including import/export settings for all supported document formats).ReadOnlySpecifies if the Rich Edit control is in read-only mode.ShowCaretInReadOnlySpecifies if the caret is visible in read-only mode.ViewsProvides access to all document View settings.WantTabs | WantReturnsSpecify if the Rich Edit control processes Tab and Enter keystrokes.
CanUndo | CanRedoIdentify if undo/redo operations are available.ClearUndoClears action history.Undo | RedoUndo/redo content changes.
DocumentProvides access to document content. You can use this property to edit the current document in code – add/remove text, tables, floating shapes, modify formatting, etc.Copy | Cut | PastePerform clipboard operations on selected content.MeasurementUnitAllows you to switch between supported measurement units.
DeselectAllClears selection.IsFloatingObjectSelected | IsSelectionInFooter | IsSelectionInHeader | IsSelectionInHeaderOrFooter | IsSelectionInTable | IsSelectionInTextBoxAllow you to identify selected content locations.OnSelectionChangedAllows you to track selection changes.SelectAllSelects all content.
CreateNewDocumentCloses the current document and creates a blank document.OnContentChanged | DocumentModelModifiedAllow you to track document content changes.OnDocumentClosingAllows you to respond to document close operations. For example, you can prevent users from closing a document.OnDocumentLoadedNotifies the application of a successful document load operation. A document may contain references to external resources (images, for example) that take a significant amount of time to load. You can handle this event to ensure that the document is loaded completely.OnEmptyDocumentCreatedAllows you to respond to a document create operation. For example, you can handle this event to load a specific document template as a new document.OnDocumentProtectionChangedAllows you to track document protection status changes.
TdxRichEditControl and TdxRichEditDocumentServer components can generate documents based on a template with placeholders (DOCVARIABLE fields).
Tip
You can use the Options.MailMerge.DataSource property to associate the control with a dataset and use it to populate placeholders with numeric values, text, and images.
CreateMailMergeOptions | MailMergeGenerate a set of documents based on a template.OnMailMergeFinished | OnMailMergeGetTargetDocument | OnMailMergeRecordFinished | OnMailMergeRecordStarted | OnMailMergeStartedAllow you to modify template-based document generation.
The Rich Edit control allows you to import and export documents in the following formats: DOCX, RTF, DOC, HTML, and TXT.
Note
TdxRichEditControl initially includes support only for RTF and TXT formats to reduce the size of a built executable file. To add support for other formats, you need to explicitly include corresponding units in your project.
LoadDocument | LoadDocumentTemplateImport a document from a file or stream in any supported format.SaveDocumentExports the current document to a file or stream in any supported format.
Show 11 items
TObject TPersistent TComponent TControl TWinControl TCustomControl TcxCustomControl TdxVCLControl TdxRichEditControlBase TdxCustomRichEditControl TdxRichEditControl
See Also