|
TCustomRichView.OnRVFPictureNeeded |
Top Previous Next |
|
Occurs when reading picture or hot-picture from RVF file or stream, and this picture was saved without its "body" type TRVFPictureNeededEvent = procedure(Sender: TCustomRichView; Name: String; const Tag: TRVTag; var gr: TGraphic) of object;
property OnRVFPictureNeeded: TRVFPictureNeededEvent; By default, images are stored inside RVF documents. If you exclude rvfoSavePicturesBody from RichView.RVFOptions, images are not saved. Only item name (value returned by GetItemText) and tag (value returned by GetItemTag) are saved. These values allow to identify the image on loading. When reading such RVF files, OnRVFPictureNeeded is called for each image.
Input parameters: Name – name of the image's item (this is a value returned by GetItemText) (converted to Unicode for Delphi/C++Builder 2009 or newer). Tag – tag of the image's item (this is a value returned by GetItemTag). Output parameter: gr – image (for example, of TBitmap type) to insert in the document. Create it in this event. Do not destroy it (RichView will destroy it when necessary)
If image was not returned in OnRVFPictureNeeded event, this event is called the second time with the value of rvespImageFileName property in the Name parameter (if value of this property was stored for this item).
See also: ▪RVF overview, contains example. |