FMXTMemoLinesProperty (C++)
Description
This simple example shows how to load a file using FMX.Memo.TMemo.Lines, how to access the ninth line, and how to retrieve the number of lines in the memo control:
Memo1->Lines->LoadFromFile("myDocument.txt");
ShowMessage("The 9th line of my file is:" + Memo1->Lines->operator[](8));
ShowMessage("The number of lines in my file is:" +
IntToStr(Memo1->Lines->Count));
This example shows how to save two lines of memo's text into a file using the FMX.Memo.TMemo.Lines property:
Memo1->Lines->Text = "1st line\n2nd line";
Memo1->Lines->SaveToFile("NewDocument.txt");
Uses
- FMX.Memo.TCustomMemo.Text ( fr | de | ja )
- FMX.Memo.TMemo.Lines ( fr | de | ja )