TextEdit Class

The single-line text editor.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

[DefaultBindingPropertyEx("Text")]
public class TextEdit :
    BaseEdit,
    IDXMenuSupport,
    IMouseWheelSupport,
    ISupportsBaselineAlignment
<DefaultBindingPropertyEx("Text")>
Public Class TextEdit
    Inherits BaseEdit
    Implements IDXMenuSupport,
               IMouseWheelSupport,
               ISupportsBaselineAlignment

Related API Members

The following members accept/return TextEdit objects:

Remarks

The TextEdit.Properties property provides access to the RepositoryItemTextEdit object - a repository item that stores editor settings.

The image below shows a sample text edit.

TextEdit

The following table enumerates main TextEdit API:

Description

API

Editor text

BaseEdit.Text
BaseEdit.EditValue

Character casing (normal, uppercase, or lowercase)

RepositoryItemTextEdit.CharacterCasing

Maximum text length

RepositoryItemTextEdit.MaxLength

Default text shown when the editor is empty

RepositoryItem.NullText
RepositoryItemTextEdit.NullValuePrompt

Methods that manage the caret's position and text selection

TextEdit.SelectionStart
TextEdit.SelectionLength
TextEdit.SelectedText
TextEdit.SelectAll
TextEdit.DeselectAll

Clipboard operations

TextEdit.Copy
TextEdit.Cut
TextEdit.Paste

Shortcuts

LEFT or UP arrow - moves the caret forward
RIGHT or DOWN arrow - moves the caret backwards
Ctrl+A - selects all the text in the editor Ctrl+Del - clear the text box
Ctrl+Z - restore the previous value
Ctrl+C or Ctrl+Ins - copy selected text to clipboard
Ctrl+V or Shift+Ins - paste text from clipboard
Ctrl+X or Shift+Del - cut selected text

Editors derived from the TextEdit class have the same features. You can modify the TextEditStyle property (for instance, RepositoryItemButtonEdit.TextEditStyle) to disable or hide the text box and prevent users from entering values.

See Also