[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'StdCtrls' (#lcl)

# TCustomMemo.Lines

Contains the individual lines of text in the multi-line edit control.

## Declaration

Source position: stdctrls.pp line 939

`public property TCustomMemo.Lines : TStrings read FLines write SetLines;`

## Description

Lines is a TStrings property which contains the individual lines of text in the multi-line edit control. The values in Lines can be accessed using the Strings and Text properties defined in TStrings. The Strings property in Lines allows an individual line of text to be accessed by its ordinal position. For example:

    // var sContent: String;
    sContent := AMemo.Lines.Strings[2];
    // equivalent to preceding since Strings is the default property
    sContent := AMemo.Lines[2];

The Text property in Lines allows access to all of the values stored in Lines. Text lines are separated by the LineEnding character sequence defined for the host platform or operating system. For example:

    // var sContent: String;
    sContent := AMemo.Lines.Text;

Changing the values in Lines causes the Modified property to be set to True. Use Text to make changes to the control value that do not cause the Modified property to be updated.

Use the Append method to add a line of text to the end of the values in Lines.

Set values in the WantTabs, WantReturns, and WordWrap properties to control the content and behavior for the multi-line edit control.

Use the OnChange event handler to perform actions needed when the value for the control has been changed.

## See also

TCustomMemo.Append |  | Appends the specified text to the Lines in the control.
TCustomMemo.WantTabs |  | Allows Tab characters to be entered into the text.
TCustomMemo.WantReturns |  | Allows the user to insert Return characters (line breaks) into the text.
TCustomMemo.WordWrap |  | Allows long lines (paragraphs) to wrap into multiple display lines.
TCustomEdit.OnChange |  | Event handler signalled when the text for the control is changed.
TCustomEdit.Modified |  | True when the value in Text has been changed using the keyboard.
TStrings
TTextStrings