?
Solved

Component TMEMO: how can I add Lines

Posted on 1998-09-01
5
Medium Priority
?
151 Views
Last Modified: 2010-05-18
In my program I have to read a file and fill the lines into the MEMO. But it shows only the first row.
How can I add lines (at runtime).

Thank you!
0
Comment
Question by:zulliger
[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
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1338335
Hi

If it's a text file, you should be able to do:
    MyMemo.Lines.LoadFromFile('C:\SomePath\SomeFile.txt');

JB
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1338336
Hi zulliger,

Every lines of memo are stored in Lines property :

* to put full file in memo :

begin
  Memo1.Lines.LoadFromFile('C:\AUTOEXEC.BAT');
  Writeln('The 6th line of AUTOEXEC.BAT is: ', Memo1.Lines[5]);
end;

* to put line in memo :

  Memo1.lines.Add('This is a new line');

Regards, Zif.
0
 

Author Comment

by:zulliger
ID: 1338337
Thank you very much!
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1338338
oops, JimBob, ... Looks like you've gave -a comment while I was answering it... Sorry didn't saw your comment, really!
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1338339
No problem Zif.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

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…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

752 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