Solved

Component TMEMO: how can I add Lines

Posted on 1998-09-01
5
145 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
  • 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 50 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now