Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


TMemo and cxMemo, line limit?

Posted on 2003-11-06
Medium Priority
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

Question by:beavei
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

Accepted Solution

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 can use this..



Expert Comment

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.
LVL 27

Expert Comment

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 ;-)

Author Comment

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

Thanks again

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

670 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