Mega Code Archive

 
Categories / Delphi / Files
 

Insert a file in a TMemo at the cursor position

Title: insert a file in a TMemo at the cursor position? procedure TForm1.Button1Click(Sender: TObject); var sl: TStringList; begin sl := TStringList.Create; try sl.LoadFromFile('c:\afile.txt'); Memo1.SetSelTextBuf(PChar(sl.Text)); finally sl.Free; end; end;