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

TextEditBase.SelectAllOnGotFocus Property

Gets or sets whether to select the entire text when the editor gets focus via keyboard. This is a dependency property.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v19.2.dll

Declaration

public bool SelectAllOnGotFocus { get; set; }

Property Value

Type Description
Boolean

true, to select the text on focus via keyboard; otherwise, false.

Remarks

Set the SelectAllOnGotFocus property to true to enable automatic text selection when the editor gets focus via the keyboard. To enable text selection when the editor gets focus via mouse click, set the TextEditBase.SelectAllOnMouseUp to true.

To select all the text within the editor manually, use the TextEditBase.SelectAll method. To select only the specified amount of text, use the TextEdit.Select method.

Setting this property has no effect for TextEditBase descendants used in GridControl. The GridControl automatically selects all text in an active editors when an end user activates a cell. To select all text when an end user opens a cell by a mouse click, set DataViewBase.EditorShowMode to MouseUp or MouseUpFocused.

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

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