Insert Table in TCustomRVData
Posted: Fri Dec 30, 2005 12:30 pm
Hello
I create a TRVTableItemInfo-Object (named Table) and fill it with Cols and Rows. If i insert into a TCustomRVData-Object (named RVData) this way, all is fine :
But I want to insert the Table at Positon CurPos, not append it at the End or in the Position of Caret.
So I tried this :
But this failed, nothing is inserted.
RVData->ItemCount is not increased.
Stream->Size is more than 0, so not empty.
Can you please tell me, how to correctly insert the Table at CurrPos?
thanks
/Edit : I use Builder 5 with RichView 1.9
I create a TRVTableItemInfo-Object (named Table) and fill it with Cols and Rows. If i insert into a TCustomRVData-Object (named RVData) this way, all is fine :
Code: Select all
RVData->AddItem("", Table);
So I tried this :
Code: Select all
TMemoryStream *Stream = new TMemoryStream();
Table->SaveToStream(Stream);
Stream->Position = 0;
TColor BkColor = clNone;
TRVBackground *Dummy1 = NULL;
TRVLayoutInfo *Dummy2 = NULL;
RVData->InsertRVFFromStream(Stream, CurrPos, BkColor, Dummy1, Dummy2, false);
delete Stream;
RVData->ItemCount is not increased.
Stream->Size is more than 0, so not empty.
Can you please tell me, how to correctly insert the Table at CurrPos?
thanks
/Edit : I use Builder 5 with RichView 1.9