TcxCustomRichEdit Class
The base class for unbound and data-aware rich text editors.
Declaration
TcxCustomRichEdit = class(
TcxCustomMemo,
IcxHintableObject,
IcxHintableObject2
)
Remarks
A rich text editor component (TcxRichEdit or TcxDBRichEdit) is a multi-line text box editor designed to view and edit Rich Text Format (RTF) documents.

Tip
TcxRichEdit is a lightweight component suitable for use an in-place editor in Data Grid, Tree List, and other native VCL DevExpress components designed to view and edit data.
The DevExpress VCL Subscription ships with a dedicated Rich Edit Control that allows you to create fully-functional word processing applications.
UI Automation/Accessibility Support
The rich text editor is mapped to a node in the UI Automation tree when the global UI Automation flag (dxUIAutomationEnabled) is enabled.
UI Automation Settings
Use Properties.Automation.Name and Properties.Automation.Description properties to specify the editor name and add optional information that is then used to clarify editor purpose for users who rely on third-party assistive tools (such as Microsoft Narrator).
Refer to the TdxAutomationElementSettings class description for detailed information on all available options.
Main API Members
The list below outlines key members of the TcxCustomRichEdit class.
Appearance Settings
- ParentColor
- Specifies if the editor uses its parent color to fill the background area.
- Style | StyleDisabled | StyleFocused | StyleHot | StyleReadOnly
Allow you to define individual appearance settings for different editor states.
Tip
To apply the same style settings to multiple editors, use a TcxEditStyleController component. If you need to apply the same style settings to all editors in your application, you can use a TcxDefaultEditStyleController component.
- Styles
- Provides access to individual styles applied to the editor in different states.
- Transparent
- Specifies if the editor is transparent in GDI render mode.
Content-Related APIs
- CanUndo
- Indicates if an undo operation is available.
- Clear
- Clears the editor.
- ClearSelection
- Deletes selected editor content.
- CursorPos
- Returns the caret position in the active editor.
- Lines
- Provides indexed access to RTF content lines.
- OnEditing
- Allows you to prevent users from activating the editor.
- ResetEditValue
- Restores the previous edit value before the pending change is applied.
- SelectAll | SelLength | SelStart | SetSelection
- Manage text selection.
- TextHint
- Allows you to display a hint message while the inactive editor is empty.
- Undo
- Discards pending changes made in the active editor.
- ValidateEdit
- Validates the display value.
Clipboard Operations
- CanSmartPaste
- Identifies if the editor supports AI-powered Smart Paste operations.
- CopyToClipboard | CutToClipboard | PasteFromClipboard
- Execute corresponding clipboard operations.
RTF Content-Related APIs
- FindTexT
- Searches the target string in editor content.
- InsertObject
- Inserts a new OLE object into editor content.
- InsertTable
- Inserts a new table into editor content.
- PageRect
- Specifies document page dimensions used for print operations.
- Paragraph | Paragraph2
- Allow you to apply formatting attributes to the current paragraph.
- Prints editor content using the default printer.
- RichVersion
- Returns the rich text editor engine version. You can use the Properties.RichEditClass property to switch between available editor engine versions.
- ShowObjectProperties
- Displays the Object Properties dialog for the selected floating object in editor content.
Editor Settings and Repository Items
- ActiveProperties
- Provides access to the current editor settings regardless of their source. This property set does not allow you to modify editor settings.
- Properties
- Allows you to configure editor settings directly if the editor does not have an assigned repository item.
- RepositoryItem
- Specifies a repository item as an external source of editor settings. A repository item has priority over other editor settings.
General-Purpose API Members
- AutoSize
- Specifies if the editor automatically adjusts its size to fit content.
- Enabled
- Specifies if the editor is enabled.
- CanModify
- Identifies if the editor is in read-only mode.
- IsEditValidating | IsHiding | IsPosting
- Allow you to identify the current operation in the editor.
- ShowHint
- Specifies if the standalone editor can display hints. To enable hints for an in-place editor in a container control, set its
OptionsBehavior.CellHints[1] property toTrue. - SupportsSpelling
- Identifies if the editor supports the TdxSpellChecker component.
- Width | Height
- Allow you to explicitly define editor dimensions.
Repository Item Class
You can create a TcxEditRepositoryRichItem component in an TcxEditRepository container to define an unbound rich text editor, store editor settings, and share them between multiple rich text editors.
Related Compiled Demo
To see the TcxRichEdit component in action, run the Ribbon Control demo in the VCL Demo Center installed with compiled DevExpress VCL demos. Use text box and built-in UI elements to edit text.
Compiled DevExpress demos ship with source code installed in the Public Documents folder (%PUBLIC%) for all users (default). You can find all project and source code files for the Ribbon Control demo in the following folder:
%PUBLIC%\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressBars/RibbonNotepadDemo\
Terminal TcxCustomRichEdit Class Descendants
Do not use the TcxCustomRichEdit class directly. Use the following descendants instead:
- TcxRichEdit
- An unbound multi-line editor designed to view and edit Rich Text Format (RTF) content.
- TcxDBRichEdit
- A data-aware multi-line editor designed to view and edit Rich Text Format (RTF) content.
Implements
Inheritance
-
Set the following behavior properties to
TrueorFalseto enable or disable in-place editor hints in corresponding container controls:- A Data Grid Table View’s OptionsBehavior.CellHints property.
- A Tree List control’s OptionsBehavior.CellHints property.
- A Vertical Grid control’s OptionsBehavior.CellHints property.