I was looking for the reason that the maximum String length in TMemo.Lines is 1024, but not yet found.
I have a text file that contains / csv delimited data that is about 2000 characters long. I use the preview reminder before processing the file.
memo.Lines.LoadFromFile (Textfile);
I set WordWrap to FALSE and scrollBar to ssHorizontal. Thus, any record will not be carried over to the next line.
But when I repeat memo.Lines, I find that the maximum String value in each index is 1 KB or 1024 characters. The rest is truncated to the next line.
But if I use TStringList to load the file, the line does not truncate to the next index when it reaches more than 1024 characters. This does not happen when I use TRichEdit.
- Can anyone explain this phenomenon?
- Is this the default behavior of TMemo?
I am using D2006 to try this.
source
share