In a TMemo field I have 3 lines:
Is it posible to get all three lines as one string?
Example:
line1,line2,line3
You can use the Lines.CommaText property for this. Do the following:
CommaString := Memo1.Lines.CommaText;
Its also useful to use the DelimitedText property if you want the text to make use of another separator character. You can do that by using something like this:
Memo1.Lines.Delimiter := '-';
Memo1.Lines.StrictDelimiter := True;
DashString := Memo1.Lines.DelimitedText;
This works both ways. You can assign a value to the CommaText or DelimiterText to set the lines. This is actually a of TStringList so it will work with TListBox, TMemo, TComboBox, etc. Basically anything that uses a string list internally.