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

TextEdit Class

The single-line text editor.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

[DefaultBindingPropertyEx("Text")]
[SmartTagFilter(typeof(TextEditFilter))]
[SmartTagAction(typeof(TextEditActions), "EditMask", "Change Mask", SmartTagActionType.CloseAfterExecute)]
[ToolboxBitmap(typeof(ToolboxIconsRootNS), "TextEdit")]
public class TextEdit :
    BaseEdit,
    IDXMenuSupport,
    IMouseWheelSupport

The following members return TextEdit objects:

Remarks

Use the TextEdit class to create a single-line text editor. The TextEdit.Properties property provides access to the repository item that holds the editor’s settings. The RepositoryItemTextEdit object, available via this property, provides a number of properties to customize the control’s appearance and behavior. Text editor specific settings allow you to specify character casing, the mask for entering data, the maximum number of characters allowed, etc.

The image below shows a sample text edit.

TextEdit

Methods provided by the TextEdit class give you the ability to:

The text displayed in the edit box can be specified via the inherited BaseEdit.Text property. This property value matches the editor’s BaseEdit.EditValue property.

Note that text editors provide a built-in context menu allowing end-users to perform basic text editing operations. These operations include undoing the last modification, selecting the editor’s content and working with the Clipboard. Note that this menu can be overridden by assigning a custom context menu to the RepositoryItem.ContextMenu property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TextEdit class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also