A newer version of this page is available. Switch to the current version.

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
<DefaultBindingPropertyEx("Text")>
<SmartTagFilter(GetType(TextEditFilter))>
<SmartTagAction(GetType(TextEditActions), "EditMask", "Change Mask", SmartTagActionType.CloseAfterExecute)>
<ToolboxBitmap(GetType(ToolboxIconsRootNS), "TextEdit")>
Public Class TextEdit
    Inherits BaseEdit
    Implements IDXMenuSupport,
               IMouseWheelSupport

Related API Members

The following members accept/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.

See Also