open two texts

General TRichView support forum. Please post your questions here
Post Reply
Ceprotec
Posts: 259
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

open two texts

Post by Ceprotec »

Hello sergey,
I wonder, how do I open a text saved in database inside another without replacing the page?

thanks
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, I do not understand. Can you give an example?
Ceprotec
Posts: 259
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

Post by Ceprotec »

example:
I have a document open in Richview, and at the end of the text I need to put a text that is saved in RTF without having to replace the above
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

LoadRTF does not clear a document, so:

Code: Select all

rv.Clear;
rv.LoadRTF(FileName1);
rv.LoadRTF(FileName2);
rv.Format;
For RVF:

Code: Select all

rv.LoadRVF(FileName1);
Stream := TFileStream.Create(FileName2, fmOpenRead);
rv.InsertRVFFromStream(Stream, rv.ItemCount);
Stream.Free;
rv.Format;
Ceprotec
Posts: 259
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

Post by Ceprotec »

ok, thanks Sergey
Post Reply