From RAD Studio API Documentation
Jump to: navigation, search


property Lines: TStrings read FRichEditStrings write SetRichEditStrings;


__property System::Classes::TStrings* Lines = {read=FRichEditStrings, write=SetRichEditStrings};


Type Visibility Source Unit Parent
property protected
Vcl.ComCtrls TCustomRichEdit


Contains the individual lines of text in the rich text edit control.

Use Lines to manipulate the text in the rich text edit control on a line by line basis. Lines is a TStrings object, so TStrings methods may be used for Lines to perform manipulations such as counting the lines of text, adding lines, deleting lines, or replacing the text in lines.

To work with the text as one chunk, use the Text property. To manipulate individual lines of text, the Lines property works better.

Warning: If you paste formatted text into the Lines property at design time, the formatting is lost when the form is saved (it does not appear at runtime). To set the value of a rich edit control at design time, you must save the formatted text in some other manner and use the LoadFromStream or LoadFromFile method of the Lines property to load the value in the OnShow method of the parent form.

See Also

Code Examples