TCustomMemoLines (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example uses a button and a memo control on a form. When you click the button, the content of the specified file is loaded into the memo, and the fifth line of the file is written across the top of the form.

Code

procedure TForm1.Button1Click(Sender: TObject);
begin
  Memo1.Lines.LoadFromFile('readme.txt');
  Caption:= Memo1.Lines[4];
end;

Uses