Board index » delphi » TMemo field (Need Help)

TMemo field (Need Help)

Hi

I have a small problem with Delphi3.

We had to do some transactions and write the result to a text file.

I wrote a procedure that makes a loop of calculation and append to a memo a
line with the current needed result and when the procedure is finished
adding all lines needed, I use the TMemo.saveToFile method in order to write
everything in the memo to a text file.

On WinNT there was no problem but on Win9x there was a problem that the
TMemo.saveToFile method wrote to the file the first 300 lines and ignored
the rest.
There was no error raised.

Can anybody explain what happened here ?

 Thanks,

  Tal Olier (mailto:ta...@rad.co.il).

 

Re:TMemo field (Need Help)


Hi!

All common controls of W9X are only 16 Bit, therefore a TMemo can
only hold 32/64 K.
Use a TRichEdit if you need more capacity on W9X.

Martin

Quote
> On WinNT there was no problem but on Win9x there was a problem that the
> TMemo.saveToFile method wrote to the file the first 300 lines and ignored
> the rest.
> There was no error raised.

> Can anybody explain what happened here ?

Re:TMemo field (Need Help)


Quote
> I wrote a procedure that makes a loop of calculation and append to a memo a
> line with the current needed result and when the procedure is finished
> adding all lines needed, I use the TMemo.saveToFile method in order to write
> everything in the memo to a text file.
> On WinNT there was no problem but on Win9x there was a problem that the
> TMemo.saveToFile method wrote to the file the first 300 lines and ignored
> the rest. There was no error raised.

> Can anybody explain what happened here ?

TMemo is a wrapper around the Windows multiline edit control, which is still
16 bit at heart on Win9x. It is thus limited to a maximum of 64K of text when
read-only and effectively 32K when editable.

If you use a TStringlist instead of a TMemo, or a TRichedit (with MaxLength
set to a high value) you will not have this problem.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads