How to assign content of a RichViewEdit List in unique RVE

General TRichView support forum. Please post your questions here
Post Reply
zehdopulo
Posts: 9
Joined: Wed Jul 22, 2009 12:54 pm

How to assign content of a RichViewEdit List in unique RVE

Post by zehdopulo »

Hi, a don't found a method to do this. Like a AnsiString, I need to concatenate RichViewEdit content in other, with iteraction, has follow:

Code: Select all

AnsiString global = "";
TStringList *list = new TStringList();
for (int i == 0; i < list->Count; i++) {
    global += list->Strings[i]; //HERE I need to concatenate RVE content in ohter RVE
}
Thank you
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Code: Select all

void AddDoc(TCustomRichView* Source, TCustomRichView* Dest);
{
  Stream = new TMemoryStream; 
  Source->SaveRVFToStream(Stream, false);
  Stream->Position = 0;
  Dest->InsertRVFFromStream(Stream, Dest->ItemCount); 
  delete Stream; 
}

  ... 

  RichView1->Clear(); 
  RichView1->DeleteUnusedStyles(true, true, true); 
  AddDoc(RVSource1, RichView1); 
  AddDoc(RVSource2, RichView1); 
  AddDoc(RVSource3, RichView1); 
  RichView1->Format();
The same example with files can be found here:
http://www.trichview.com/forums/viewtopic.php?t=272 (Delphi)
zehdopulo
Posts: 9
Joined: Wed Jul 22, 2009 12:54 pm

Post by zehdopulo »

I have a similar code, but don't works if my RVPrint has Header. In Header, I add Controls, like a Panels, Labels and Edits, and when I call LoadFromStream, this generates a EClassNotFound exception... What do I do?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Post Reply