trichview.support
Saving TRVPrint properties in RVF file or BLOB field |
Author |
Message |
Tavo |
Posted: 06/02/2003 4:17:25 Hi all: I'm using TDBRichViewEdit to save judicial writings in BLOB fields of several tables, but I should also save some data (the properties of TRvPrint): MirrorMargins, RightMarginMM, LeftMarginMM, TransparentBackGroud, etc. I would like to be able to save the values of those properties inside the document (rvf file or BLOB field), to avoid to add fields to each one of the tables. How can I make this? Which is the best way? I think could create a descendant of TCustomRVItemInfo with those values: TPrintCustomRVItemInfo = class(TRVNonTextItemInfo) public LeftmarginMM : Integer ; Mirrormargins : Boolean ; etc ; end ; and to insert it in the text, in an invisible way, without text: InsertItem ('', TMyPrintRVItemInfo); and to obtain the info: function FindPrintInfo(rv: TCustomRichView): TPrintCustomRVItemInfo ; var i: Integer; begin Result := nil; for i := 0 to rv.ItemCount-1 do if rv.GetItem(i).ClassType=TPrintCustomRVItemInfo then begin Result := TPrintCustomRVItemInfo(rv.GetItem(i)) ; exit; end; end; Do I go for the correct road? Is there an easier way and I didn't see it? If it was the correct road.... is it correct to inherit from TRVNonTextItemInfo? I'm not capable to see the difference between TRVNonTextItemInfo and TCustomRVItemInfo. Thanks for readme. Tavo. |
Powered by ABC Amber Outlook Express Converter