Is there a way to load the content of a file to TAdvMemo not using the AcceptFile drag and drop option?
Asked
Active
Viewed 699 times
1 Answers
1
Most VCL-based memo controls (including third-party ones) have a Lines.LoadFromFile
or something similar.
According to TMS's website, TAdvMemo
has a Lines
property, which should be a TStrings
descendant and therefore should support LoadFromFile
. (See the FAQ page I linked to, specifically the question about seeing if the text is empty - it uses the Lines
property.)
So it should be as easy as (Delphi code):
AdvMemo1.Lines.LoadFromFile('C:\Temp\YourFile.txt');
So, in C++ Builder it should be something like:
AdvMemo1->Lines->LoadFromFile("C:\\Temp\\YourFile.txt");

Ken White
- 123,280
- 14
- 225
- 444