trichview.com

trichview.support




Re: SaveHTMLToStream


Return to index


Author

Message

Sergey Tkachenko

Posted: 01/14/2004 12:02:06


Hi,


Yes, this is one of possible solutions.

Each image have the associated text string (item name) which is not used by

the component itself, and you can use it as you want: for example, for

storing file name.

Item name is the first parameter of InsertPicture. It can be get/set by the

methods GetItemText/SetItemText.

RichViewActions (http://www.trichview.com/resources/actions/ ) have support

for this using of item names: TrvActionInsertPicture.StoreFileName boolean

property.


There is, however, another solution. It was implemented after releasing

v1.8, so it is not included in the help file yet.

See readme.txt in the installation of TRichView, v1.8.4.

Picture items have a special string property for storing file names. If

rvsoUseItemImageFileNames is included in the Options parameter of

SaveHTML/SaveHTMLEx, this property will be automatically used, and

processing OnHTMLSaveImage is not required.


> Hi

>

> I did find the answer here. Thanks anyway

>

> procedure TEmailSendManagerForm.RichViewEdit1HTMLSaveImage(Sender:

> TCustomRichView;

>                                                            RVData:

> TCustomRVData;

>                                                            ItemNo:

Integer;

>                                                       const Path: String;

>

BackgroundColor:

> TColor;

>                                                         var Location:

> String;

>                                                         var DoDefault:

> Boolean);

> var

>    s: String;

> begin

>   if (ItemNo >= 0) and((RVData.GetItemStyle(ItemNo)=rvsPicture)

> or(RVData.GetItemStyle(ItemNo)=rvsHotPicture)) then begin

>     s := RVData.GetItemText(ItemNo);

>     if s <>'' then begin

>       Location := s; //ExtractRelativePath(Path, s);

>       DoDefault := False;

>     end;

>   end;

> end;





Powered by ABC Amber Outlook Express Converter