Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

tEdit and text>64KB

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
publicprivateprotectedvariables
Asked:
publicprivateprotectedvariables
1 Solution
 
Mohammed NasmanSoftware DeveloperCommented:
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
 
Wim ten BrinkCommented:
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
 
kretzschmarCommented:
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ginsonicCommented:
In your form create func add this line :

SendMessage(RichEdit1.Handle, EM_EXLIMITTEXT, 0, $7FFFFFFF);
0
 
ginsonicCommented:
Or:

RichEdit11.MaxLength := $7FFFFFF0;
0
 
ginsonicCommented:
I use this code and can load in less that a second ~2MB .
0
 
ginsonicCommented:
not sure if is the best way. just a comment!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now