I need to save and load captions of several labels. I tried use TMemo for this:
procedure TForm1.Button1Click(Sender: TObject);
begin
if SaveDialog1.Execute then
begin
Memo1.Lines.SaveToFile(saveDialog1.FileName+'.txt');
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if OpenDialog1.Execute then
begin
Memo1.Lines.LoadFromFile(OpenDialog1.FileName);
end;
end;
But I don’t know how to set and get specific data of Label1, Label2, etc on the TMemo.
Based on this idea later I will use other components as TEdit.