Back to Devexpress

RepositoryItemMemoExEdit.AcceptsReturn Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemmemoexedit-29bbe3c5.md

latest2.8 KB
Original Source

RepositoryItemMemoExEdit.AcceptsReturn Property

Gets or sets a value specifying whether a user can insert return characters into text.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(true)]
[DXCategory("Behavior")]
public bool AcceptsReturn { get; set; }
vb
<DXCategory("Behavior")>
<DefaultValue(True)>
Public Property AcceptsReturn As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if return characters typed within the dropdown window are accepted and processed by an extended memo editor; otherwise, false.

|

Remarks

The AcceptsReturn property controls the user’s ability to insert return characters into an extended memo editor’s text.

When this property is true (the default behavior), pressing the ENTER key in the dropdown window is processed by the editor, thus creating a new text line.

If AcceptsReturn is set to false , the ENTER key is not processed by the editor. It is possible, however, to insert return characters into the memo editor’s text via code by adding appropriate characters (for instance, “\r\n” for C#) to the BaseEdit.Text property.

When the editor’s dropdown window is not activated, pressing the ENTER key in the focused extended memo edit control is always processed by the form, regardless of the AcceptsReturn setting. For instance, the ENTER key can activate the form’s default button (if any). You can specify the default button for a form via the form’s AcceptButton property.

Assigning a new value for the AcceptsReturn property at runtime raises the RepositoryItem.PropertiesChanged event.

See Also

AcceptsTab

RepositoryItemMemoExEdit Class

RepositoryItemMemoExEdit Members

DevExpress.XtraEditors.Repository Namespace