Skip to main content

MemoEdit.Lines Property

Gets or sets the lines of text within a memo edit control.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Appearance")]
public virtual string[] Lines { get; set; }

Property Value

Type Description
String[]

An array of strings containing the text of a memo editor.

Remarks

The Lines property specifies the array of lines displayed by the editor. The number of lines matches the number of elements in the array. To access all the text at once, you can use the inherited BaseEdit.Text property. Text lines are separated by line feed and carriage return characters (“\r\n”).

The Lines property contains only explicitly created lines, i.e., substrings of Text which are separated by the return characters. When the word wrap feature is enabled (the RepositoryItemMemoEdit.WordWrap property is set to true), long text wraps automatically at the control’s right edge. The Lines property does not take into account such soft word wraps.

You are not able to use the Lines property to change a particular array’s element directly. Instead, you should read the Lines property to get the array, change the required array’s element and then assign the array back to Lines.

If a memo editor is used for inplace editing within container controls such as the Grid Control and the row auto height feature of the editor’s owner control (XtraGrid) is active, you can use the RepositoryItemMemoEdit.LinesCount property to control the number of text lines that are going to be displayed in the memo editor.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Lines 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