Newline Inside a String To Be Shown At a TMemoBox
The solution is to use #13#10 or better as Sertac suggested sLineBreak.
FullMemo := txtFistMemo.Text + #13#10 + txtDetails.Text;
FullMemo := txtFistMemo.Text + sLineBreak + txtDetails.Text;
A more platform independent solution would be TStringList
.
var
Strings: TStrings;
begin
Strings := TStringList.Create;
try
Strings.Assign(txtFirstMemo.Lines); // Assuming you use a TMemo
Strings.AddStrings(txtDetails.Lines);
FullMemo := Strings.Text;
finally
Strings.Free;
end;
end;
To Add an empty newline you can use:
Strings.Add('');
Use
FullMemo := txtFistMemo.Text + #13#10 + txtDetails.Text