RichViewEdit and images

General TRichView support forum. Please post your questions here
Post Reply
Marcer
Posts: 32
Joined: Mon Mar 23, 2009 1:54 pm

RichViewEdit and images

Post by Marcer »

Is it possible to have an image included by reference to a physical file in the RVF without the image content being included in the RVF?
Sergey Tkachenko
Site Admin
Posts: 17692
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RichViewEdit and images

Post by Sergey Tkachenko »

It is possible, but only for all images in the document.
Exclude rvfoSavePicturesBody from RVFOptions, and images will not be saved inside files. When loading file, OnRVFPictureNeeded event occurs.
Marcer
Posts: 32
Joined: Mon Mar 23, 2009 1:54 pm

Re: RichViewEdit and images

Post by Marcer »

Does this also work if the content of the TRichViewEdit is RTF?
Sergey Tkachenko
Site Admin
Posts: 17692
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RichViewEdit and images

Post by Sergey Tkachenko »

No, for RTF it's a bit more difficult.
RTF files can contain references to external pictures via INCLUDEPICTURE field.
You need to implement saving pictures as this field type. It can be done using OnSaveItemToFile event.
The example can be found in the demo projects, in Demos\DelphiUnicode\Assorted\Graphics\SharedImages\ demo.
Post Reply