LoadRVFFromStream into a table cell does not load backround
Posted: Mon Aug 26, 2024 8:33 pm
Hello Sergey,
I have RichViewEdit1 and RichViewEdit2 on a form. One contains some text with a background image (or a background color). The other contains a table with several cells.
I need to copy full RichViewEdit1 content into a table cell of RichViewEdit2.
I use this code:
Unfortunately, this code does not load a background picture or a color from RichViewEdit1 into a cell. Could you help?
I have RichViewEdit1 and RichViewEdit2 on a form. One contains some text with a background image (or a background color). The other contains a table with several cells.
I need to copy full RichViewEdit1 content into a table cell of RichViewEdit2.
I use this code:
Code: Select all
TStream* Stream = new TMemoryStream;
RichViewEdit1->SaveRVFToStream(Stream, false);
TRVLayoutInfo * ALayout = RichViewEdit1->CreateLayoutInfo();
TColor AColor = RichViewEdit1->Color;
TRVBackground *ABackGround = RichViewEdit1->Background;
Stream->Position = 0;
table->Cells[j][i]->LoadRVFFromStream(Stream, AColor, ABackGround, ALayout, NULL, NULL);
delete ALayout;
delete Stream;