Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening a text files and adding into ListBox

Status
Not open for further replies.

igornastoski

Technical User
Mar 21, 2002
6
0
0
SI
Hi, my name is Igor and i am just a beginner in C++ builder, so I have a lot of questions. I'm wondering if there is someone who can help me.
Problem:
Opening a file (.txt, .doc) where every line in a file would be mapped (added) into one item line of ListBox component.

Thanks,
Igor
 
You probably want to look at the TStrings::LoadFromFile method.

ex.
Code:
ListBox1->Items->LoadFromFile("c:\\myfile.txt");

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top