A collection of objects that can be stored in RVF files or streams.
type // defined in RVDocParams unit
TRVDocObjectCollection = class (TOwnedCollection);
TRVDocObject = class (TCollectionItem);
property DocObjects: TRVDocObjectCollection;
(introduced in version 17)
TRVDocObjectCollection is a collection of items inherited from TRVDocObject. Items of this collection may have different type.
All published properties of items can be saved and loaded.
If rvfoSaveDocObjects is in RVFOptions, these objects are saved in RVF.
If rvfoLoadDocObjects is in RVFOptions, methods for loading RVF load these objects. Methods for inserting RVF ignore these objects.
Method TRichView.Clear clears DocObjects.
There is one more property allowing to save custom data in RVF: DocProperties.
Report Workshop defines TRVReportDocObject having properties DataQuery, HighlightRules and others.
So, for Report Workshop, DocObjects is a way of adding new properties to TRichView without modifying TRichView source code.
Define your own classes:
TMyDocObjectA = class (TRVDocObject)
property A: String ...
TMyDocObjectB = class (TRVDocObject)
property B: Integer ...
ObjA := TMyDocObjectA.Create(MyRichView.DocObjects);
ObjA.A := 'Hello';
ObjB := TMyDocObjectB.Create(MyRichView.DocObjects);
ObjB.B := 1;
How to save to RVF: include rvfoSaveDocObjects in RVFOptions.
How to load from RVF: include rvfoLoadDocObjects in RVFOptions.
See also methods for saving RVF (they can save this property):
See also methods for loading RVF (they can load this property):
See also methods of TRichViewEdit for inserting RVF in the caret position (they ignore this property):
See also methods for inserting RVF (they ignore this property):
See also properties: