Home > Back-end >  The couple consult
The couple consult

Time:09-24

In c + + builder, how to read a text file and displayed in the corresponding Edit the content of the column, the file has several lines   , which a great god can teach me, next grateful!!!!!!!!!!!!!!!!
 

CodePudding user response:

With a Memo, Memo1 - & gt; Lines - & gt; LoadFromFile (" XXX. TXT ");

CodePudding user response:

C + + Builder 6.0 how to use under Windows 7 to Help Help
http://blog.163.com/tab_98/blog/static/1192409720160251029113/

CodePudding user response:

reference 1st floor u010165006 response:
Memo, Memo1 - & gt; Lines - & gt; LoadFromFile (" XXX. TXT ");


Boon boon
But I'd like to have it wrapped inside the class, ok?
Then click on the "" open" "button, you can select the file and display content

CodePudding user response:

Like this, in the Read it, and then in the BUTTON calls Read and displayed in the Memo

CodePudding user response:

CodePudding user response:

reference 5 floor A15172315112 reply:


Such as Unit1. CPP have TForm1 * Form1;
Unit1. H with extern PACKAGE TForm1 * Form1;

May your business CPP file # include "Unit1. H"
You can access the global variable Form1,
Read function:
Form1 - & gt; Memo1 - & gt; Lines - & gt; LoadFromFile (... );

CodePudding user response:

Bad, learned, many thanks!!!!!!!!!!
  • Related