Solved

tEdit and text>64KB

Posted on 2004-08-12
10
158 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:
mnasman 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

10 Experts available now in Live!

Get 1:1 Help Now