Solved

tEdit and text>64KB

Posted on 2004-08-12
10
169 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month10 days, 8 hours left to enroll

628 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