Solved

tEdit and text>64KB

Posted on 2004-08-12
10
160 Views
Last Modified: 2010-04-04
I have to pass a big text(~1MB) to an tMemo. Under winXP it works fine because winXp is pure 32bit code but under win98 the memo control is implemented with 16bit code, so it can only hold 64KB.

If i try to use tRichEdit, i have to wait 30sec for the 1MB text to be passed to the RichEdit1:

RichEdit1.lines.BeginUpdate;
RichEdit1.Lines.text := one_MB_big_ansi_string;
RichEdit1.Lines.EndUpdate;

So tRichEdit is not a solution. I can't understand why tMemo in winXP(32bit code) is a lot faster than tRichEdit(also 32bit code). There must be a difference.

Any ideeas on how i could work around this?
0
Comment
10 Comments
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 200 total points
ID: 11789073
Hello

  That's limitation of winx not of Delphi

Try to set RichEdit.PlainText = true, I'm not sure of this will help you, I haven't used winx since long time :-)

also try to replace Tmemo with SynEdit, which is much faster than TMemo, and If I remember well, it hasn't the same limitation that Tmemo has
http://synedit.sourceforge.net/

HTH

Regards,
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 11791387
A richtext will parse the text that you're inputting to search for special format characters.

Have you considered using a TListbox instead?  Or other components?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 11791789
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Expert Comment

by:ginsonic
ID: 11800993
In your form create func add this line :

SendMessage(RichEdit1.Handle, EM_EXLIMITTEXT, 0, $7FFFFFFF);
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 11800997
Or:

RichEdit11.MaxLength := $7FFFFFF0;
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 11801000
I use this code and can load in less that a second ~2MB .
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 13405681
not sure if is the best way. just a comment!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now