Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Component TMEMO: how can I add Lines

Posted on 1998-09-01
5
Medium Priority
?
154 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

636 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