Back to Devexpress

RepositoryItemMemoEdit.AcceptsReturn Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemmemoedit-73ed5fab.md

latest2.5 KB
Original Source

RepositoryItemMemoEdit.AcceptsReturn Property

Gets or sets a value specifying whether return characters can be inserted 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 are accepted and processed by a memo editor; otherwise, false.

|

Remarks

Use the AcceptsReturn property to control whether a user can insert return characters into memo editor text.

When this property is true (the default behavior), the ENTER key is processed by the editor and results in a new text line.

If the AcceptsReturn property is set to false , return characters are processed by the form. For instance, the ENTER key can activate the form’s default button (if any). You specify the default button for your form via the form’s AcceptButton property. 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.

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

See Also

AcceptsTab

RepositoryItemMemoEdit Class

RepositoryItemMemoEdit Members

DevExpress.XtraEditors.Repository Namespace