TCustomMemo.Lines property
Contains the individual lines of text in the multi-line edit control.
Declaration
property 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
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
