Solved

tEdit and text>64KB

Posted on 2004-08-12
10
165 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Delphi cmd execution 6 67
Help on project with Soap 10 57
DBGrid or StringGrid ? 6 105
Delphi Firemonkey: if the Sms contain special characters it won't send it 3 45
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…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

820 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