November 17th, 2004, 06:34 PM
Reading content of a text file....
I am using the OpenDiag component to open a file, but after open a file i want to read the contents of that file into my Memo field...
How can i do this?
November 18th, 2004, 11:26 AM
See the Delphi help >> Text File Routines ... everything you need is there !
November 18th, 2004, 02:19 PM
Heh, the TStringList object (i.e. Memo.Lines) has a LoadFromFile method. You can use this to read data from a file into a memo. Something like this ought to do the trick:
if OpenDialog1.Execute then
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
November 18th, 2004, 04:58 PM
it depends how you want to read it?
is it just normal text/
comma, comma delimated, tab data?
November 22nd, 2004, 09:38 PM
Its just a normal text file, i also came cross thse 2 ways of doingit:
while not Eof(myFile) do