I've searched everywhere in the VCL to see where this is specified, and
can't find it.
Where is this specified, and if possible, how can it be increased?
I'm most interested in knowing where it's specified.
Thanks!
Alan
alan....@ingenix.com
It is not in the VCL, the limit is in the Windows controls themselves. The
VCL hardcodes a limit of 4K for a line in TMemo:
function TMemoStrings.Get(Index: Integer): string;
var
Text: array[0..4095] of Char;
begin
Word((@Text)^) := SizeOf(Text);
SetString(Result, Text, SendMessage(Memo.Handle, EM_GETLINE, Index,
Longint(@Text)));
end;
The only place i found the API limit documented (for a memo) was an old Win
3.1 document on the MSDN library CD, but the limit seems to have been
carried over to Win32.
Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Try TRichEdit with PlainText set to true
Garry Kernan
"Alan McKeen" <alan....@ingenix.com> wrote in message
news:8rac5p$ho...@bornews.borland.com...
> The length of an individual line for descendents of the TCustomMemo class
> (TMemo, TRichEdit) is 1024 characters.
>
> I've searched everywhere in the VCL to see where this is specified, and
> can't find it.
>
"Peter Below (TeamB)" <10011...@compuXXserve.com> wrote in message
news:VA.00005e5...@antispam.compuserve.com...
> In article <8rac5p$ho...@bornews.borland.com>, Alan McKeen wrote:
> > The length of an individual line for descendents of the TCustomMemo
class
> > (TMemo, TRichEdit) is 1024 characters.
> >
> > I've searched everywhere in the VCL to see where this is specified, and
> > can't find it.
>
Thanks,
Alan
"Sympatico" <gke...@sk.sympatico.ca> wrote in message
news:8rbcqg$m2...@bornews.borland.com...
> Alan,
>
> Try TRichEdit with PlainText set to true
>
> Garry Kernan
>
>
> "Alan McKeen" <alan....@ingenix.com> wrote in message
> news:8rac5p$ho...@bornews.borland.com...
> > The length of an individual line for descendents of the TCustomMemo
class
> > (TMemo, TRichEdit) is 1024 characters.
> >
> > I've searched everywhere in the VCL to see where this is specified, and
> > can't find it.
> >
>The only place i found the API limit documented (for a memo) was an old Win
>3.1 document on the MSDN library CD, but the limit seems to have been
>carried over to Win32.
According to the Win API online help it looks like you can increase
the limit of a TMemo up to 64K using the EM_SETLIMITTEXT message.
However, when testing on Windows NT, I haven't found such limit at all
(a TMemo can contain several Mb's of text).
A TRichEdit appears to have a default limit of 32K (see EM_EXLIMITTEXT
in the online help).
Jan
That is the limit for the complete text. We are talking about a limit
to the length of a single line here.
>That is the limit for the complete text. We are talking about a limit
>to the length of a single line here.
Oops, thanks. I had this gut feeling that I was missing something
obvious here.
Jan