Board index » delphi » RichEdit - Append RTF files.

RichEdit - Append RTF files.

Hi,
When searching DEJA I found that this question was asked before, but
not answered so here goes ---

I have a few Rich Text files that I want to load into the same
Richedit.  How do I do this?

That`s very funny Scotty. Now beam down my clothes!

Remove dashes in E-Mail.

 

Re:RichEdit - Append RTF files.


Anton <Ant...@-osi.co.za> wrote in article
<35dd0d78.8360...@196.4.160.8>...

Quote
> Hi,
> I have a few Rich Text files that I want to load into the same
> Richedit.  How do I do this?

TRichEdit has a Text property, which is a string containing all the text in
the control.
Just do this:

s := RichEdit1.Text;
RichEdit1.Lines.LoadFromFile('filename.rtf');
RichEdit1.Text := s + RichEdit1.Text;

Some people may have a more elegant way of doing things, but this works!

- Graeme Vincent

Other Threads