From Appmethod Libraries
Jump to: navigation, search

Object Pascal

property Lines: TStrings read FLines write SetLines;


__property System::Classes::TStrings* Lines = {read=FLines, write=SetLines};


Type Visibility Source Unit Parent
property published
FMX.Memo TMemo


Provides access to the individual lines in the TMemo control.

Use Lines to manipulate the individual lines in a TMemo control.

Lines is a TStrings object, so you can use TStrings methods to easily work with the Lines property.

For example, you can count the number of lines of text:

 ShowMessage(The number of lines in my file is:' + IntToStr (Memo1.Lines.Count));

You can add new lines:

 Memo1.Lines.Append(‘New text at the end of memo’);

You can delete lines:

 Memo1.Lines.Delete(0); // Delete fist line from Memo

You can replace lines with new text:

 Memo1.Lines[8] := ‘Replace 9th  line with this text’;

See Also

Code Examples