Page 1 of 1

How to assign content of a RichViewEdit List in unique RVE

Posted: Fri Jul 24, 2009 1:15 pm
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

Posted: Mon Jul 27, 2009 3:03 pm
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)

Posted: Mon Jul 27, 2009 5:15 pm
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?

Posted: Tue Jul 28, 2009 9:34 am
by Sergey Tkachenko