Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-11

Setting TextLineBreakStyle in TMemo

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

Hi, I need to save the contents of a TMemo to a text file with CRLF line endings.

By default, the TStrings.TextLineBreakStyle is platform dependent, as mentioned in
http://www.freepascal.org/docs-html/rtl/classes/tstrings.textlinebreakstyle.html:

On FormCreate, I'm setting myMemo.Lines.TextLineBreakStyle := tlbsCRLF, also my program adds lines to the TMemo using myMemo.Lines.Add(text). But, when I do myMemo.Lines.SaveToFile(...) the result is an LF (unix) text file.

Does anyone what I'm doing wrong?.

Regards,

Reply by email