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

x
?
Solved

TMemo and cxMemo, line limit?

Posted on 2003-11-06
4
Medium Priority
?
935 Views
Last Modified: 2007-12-19
Hi Experts, I have no idea whats causing this. I have tried both a TMemo component and cxMemo component with the same results. I have the following code:

memCustDetails: TMemo;
.
.
.

memCustDetails.Lines[0] := frmCustomerLookup.FName + ' ' + frmCustomerLookup.Surname;
memCustDetails.Lines[1] := frmCustomerLookup.Address;
memCustDetails.Lines[2] := 'test';
memCustDetails.Lines[3] := 'test2';

After successfully entering the first two lines, the memo never shows the 3rd line or line[2]. 'test' is never displayed. It would appear that any line after the second or line[1] is never displayed. Is there a limit on the number of lines?

Thanks in advance

Ian
0
Comment
Question by:beavei
4 Comments
 
LVL 3

Accepted Solution

by:
ThoseBug earned 300 total points
ID: 9695440
the problem is when you use lines[x] only.. may be in the line [2] or [3] don't have any valid char...the consequence is this line not exits...you can use this..

memo1.Lines.Insert(0,'test');
memo1.Lines.Insert(1,'test');
memo1.Lines.Insert(2,'test');
memo1.Lines.Insert(3,'test');

Regards.
0
 
LVL 6

Expert Comment

by:swift99
ID: 9699190
Tmemo has a line limit that is fairly small (or possibly a buffer size limit).

TRichText (or is it TRichMemo?) has a much higher limit.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9699606
it is TRichEdit, swift99

TMemo-limit default -> 32KB, max 64KB
TRichedit-limit default -> 64KB max 2GB

(XP, win2000 have a bit higher default limits)

but the problem is worked out by ThoseBug already

meikl ;-)
0
 

Author Comment

by:beavei
ID: 9705842
Thanks ThoseBug it works a treat. Very strange how the 'memo.lines[x] := value' doesn't go past 2 though...

Thanks again
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

824 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