|
TCustomRichView.OnSaveRTFExtra |
Top Previous Next |
|
Allows saving additional information in RTF type TRVRTFSaveArea = (rv_rtfs_TextStyle, rv_rtfs_ParaStyle, rv_rtfs_CellProps, rv_rtfs_RowProps, rv_rtfs_Doc); TRVSaveRTFExtraEvent = procedure (Sender: TCustomRichView; Area: TRVRTFSaveArea; Obj: TObject; Index1, Index2: Integer; InStyleSheet: Boolean; var RTFCode: String) of object;
property OnSaveRTFExtra: TRVSaveRTFExtraEvent; This event occurs when saving RTF (SaveRTF, SaveRTFToStream). Text assigned to RTFCode parameter will be saved in RTF. Area defines place where RTFCode will be inserted. Meaning of Index1, Index2 and Obj depend on Area.
Example procedure TMyForm.MyRichViewSaveRTFExtra( Sender: TCustomRichView; Area: TRVRTFSaveArea; Obj: TObject; Index1, Index2: Integer; InStyleSheet: Boolean; var RTFCode: String); begin if Area=rv_rtfs_Doc then RTFCode := '\paperw11906\paperh16838\margl567\'+ 'margr567\margt567\margb567'; end; This example saves paper size = A4, and margins = 1 cm. See also properties: See also events: See also examples: |