If you do this:
Edit1.Text := StringOfChar('X', 37440);
It will show the text, however if you do this:
Edit1.Text := StringOfChar('X', 37441);
The text will not appear.
Does anybody knows why?
If this is an error, there is another way of adjusting rather than replacing all existing components to TMemo?
Why 37440 Anyway?
On the face of it you ought to be able to control this using the
EM_LIMITTEXT
message:And this message is exposed by the
MaxLength
property ofTEdit
.However, setting
MaxLength
to a large value doesn't appear to help. I cannot persuade a single line edit control to display a large number of characters.I suspect the only viable option for you is to use a multi-line edit control, that is a
TMemo
.I'm sure MS would argue that single line edit controls are not designed to hold thousands of characters and so they have no motivation to make that control more capable.
FWIW, with the Unicode version of the control, the cutoff appears to be at 37444 rather than 37440!