Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Appending to lines in Tmemo

Posted on 2003-03-26
Medium Priority
Last Modified: 2010-04-16

Is there a way append to a line in a Memo?
In other words, if I have add the line "This is a test" to a Memo, and then add " This is a test again", I want the line to show "This is a test This is a test again" on one line, not on 2 separate lines.  

Question by:jexd99
LVL 12

Accepted Solution

esoftbg earned 500 total points
ID: 8214120
Memo.Text := 'This is a test';
Memo.Text := Memo.Text + ', ' + 'This is a test again';

This code works !!!

Expert Comment

ID: 8214250
esoftbg's solution works if you only want add to the end of the memo.  If you want to add onto multiple lines I think you need to index the lines property.

Memo.Lines[1] := Memo.Lines[1] + 'This is a test again';

Author Comment

ID: 8214371
Thanks, both of you answered my question. I don't know why I didn't try that, for some reason I didn't think that would work. :)

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month11 days, 23 hours left to enroll

564 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