Board index » delphi » Capacity of TMemo/TRichEdit

Capacity of TMemo/TRichEdit

I have searched every where and I cannot find the specifications for the
text capacity of a TMemo\TRichEdit.

Can some one point me in the right direction?

Geoff Ash

 

Re:Capacity of TMemo/TRichEdit


Quote
Geoffrey Ash wrote in message <7o8dhs$67...@newsman.murdoch.edu.au>...
>I have searched every where and I cannot find the specifications for
the
>text capacity of a TMemo\TRichEdit.

>Can some one point me in the right direction?

 Don't know for a TRichEdit, but in Tom Swan's "Delphi 4 Bible" it says
that in D4 there is no theoretical limit for a TMemo. It is a pity
though that Windows limits the capacity to 64K. My tests show that if
you enter text in a TMemo, the limit is 32K ...unless you change
MaxLength to "greater than 32K" and only then the capacity can go up to
64K.

Guido
webmaster of DelphiLand
www.festra.com

Re:Capacity of TMemo/TRichEdit


Hi Geoff,

On Wed, 4 Aug 1999 12:01:26 +0800, "Geoffrey Ash"
<a...@central.murdoch.edu.au> scribbled:

Quote
>I have searched every where and I cannot find the specifications for the
>text capacity of a TMemo\TRichEdit.

>Can some one point me in the right direction?

>Geoff Ash

I not 100% sure on this, but I think the following is the case :

* TRichEdit is limited only by available memory
* TMemo is a little more complex. Under Win95 (and I suspect Win98) the
absolute limit is 64K. However, under WinNT it's limited only by
available memory, like TRichEdit.

This is demonstrated by Notepad which has a file size limit under Win95
of (I seem to remember - don't use '95 anymore) 64K, while under NT you
can load any size of file into Notepad.

Regards,

Dave.
--
Dave Hughes (d...@waveform.free-online.co.uk)
"What do you want?"...
"Yes, but what do you REALLY want?"...
"And then what do you want?" - Morden, B5

Re:Capacity of TMemo/TRichEdit


I Thought Delphi 3, 4, and 5 had much larger limits.  4.3 gig in fact.  And
even if you run out of memory won't the OS switch to virtual memory?  Maybe I'm
just talking out of my butt, but it similar to DOS edit.  The win95 version of
edit can open very large files.  4.3 gig is from 2 to the 32nd power.  

Re:Capacity of TMemo/TRichEdit


Hi,

On 06 Aug 1999 16:16:58 GMT, shakepe...@aol.com (Shakepeare) scribbled:

Quote
>I Thought Delphi 3, 4, and 5 had much larger limits.  4.3 gig in fact.  And
>even if you run out of memory won't the OS switch to virtual memory?  Maybe I'm
>just talking out of my butt, but it similar to DOS edit.  The win95 version of
>edit can open very large files.  4.3 gig is from 2 to the 32nd power.  

Hmmm ... must admit I have no experience of Delphi 3, 4 or 5 so I could
be completely wrong here - but I think the limits aren't actually
imposed by Delphi but by Windows itself. I'm sure you're right about
Edit under the command line - it can indeed handle "unlimited" size
files - but I'm sure I remember under '95 ('98 as well anyone?) that if
you try and open a file that's too large in Notepad (~200k for example),
it'll come up with the message

"This file is too large for Notepad, do you want to load it in Wordpad?"

Or something along those lines. This is because Notepad uses
(essentially) a TMemo component while Wordpad uses (again, essentially)
a TRichEdit component.

Now, for some reason (totally unknown to me - anyone else shed any light
on this?), TMemo's (or whatever it is Windows uses underneath) have a
limit under '95 but not NT (aptly demonstrated by the fact I've happily
loaded 800k text files into Notepad under NT!). However, TRichEdit's
don't.

I can't for the life of me remember whether it's 32k or 64k that you can
bung into Notepad or TMemo's under '95 and unfortunately I don't have
any '95 machines lying around to test it out on but I'm sure I remember
that limit existing. Of course - I could always be wrong (oh - it's
those nice men in white coats again.... [urg] [arg] [must ... free ...
arms ... ... must ... keep ... typ

Re:Capacity of TMemo/TRichEdit


Fri, 06 Aug 1999 19:38:43 GMT, d...@waveform.free-online.co.uk (Dave Hughes) napisa3(a):

Quote
>>I Thought Delphi 3, 4, and 5 had much larger limits.  4.3 gig in fact.  And
>>even if you run out of memory won't the OS switch to virtual memory?  Maybe I'm
>>just talking out of my butt, but it similar to DOS edit.  The win95 version of
>>edit can open very large files.  4.3 gig is from 2 to the 32nd power.  

>Hmmm ... must admit I have no experience of Delphi 3, 4 or 5 so I could
>be completely wrong here - but I think the limits aren't actually
>imposed by Delphi but by Windows itself.

yes, it's true

Quote
>I'm sure you're right about
>Edit under the command line - it can indeed handle "unlimited" size
>files - but I'm sure I remember under '95 ('98 as well anyone?) that if
>you try and open a file that's too large in Notepad (~200k for example),
>it'll come up with the message

>"This file is too large for Notepad, do you want to load it in Wordpad?"

>Or something along those lines. This is because Notepad uses
>(essentially) a TMemo component

but not real tmemo, it uses simple EDIT control, which wrapper in delphi is tcustomedit and derivated for example tmemo

Quote
>while Wordpad uses (again, essentially)
>a TRichEdit component.

as in previous paragraph it's not real trichedit but RICHEDIT windows control which wrapper in d is tcustomrichedit

Quote
>Now, for some reason (totally unknown to me - anyone else shed any light
>on this?), TMemo's (or whatever it is Windows uses underneath) have a
>limit under '95 but not NT (aptly demonstrated by the fact I've happily
>loaded 800k text files into Notepad under NT!).

reason for low limit of edit control in w95 is 16-bits nature/past of its, and no real limit in nt is 32-bits nature winnt

Quote
>However, TRichEdit's
>don't.

trichedit is very good and useful editing control for BOTH win95 and nt because in correct version it edits BIG contents and contents in UNICODE, but you must set high value of legth richedit control

Other Threads