trichview.com

trichview.support




Re: OnsavecomponenttoFile event


Return to index


Author

Message

Sergey Tkachenko

Posted: 02/23/2003 19:54:48


There were some misprints.

Fixed version:


procedure TForm1.RichViewEdit1SaveComponentToFile(Sender: TCustomRichView;

  Path: String; SaveMe: TPersistent; SaveFormat: TRVSaveFormat;

  var OutStr: String);

var FileName: String;

begin

  case SaveFormat of

   rvsfHTML:

       begin

         if SaveMe is TRxGifAnimator then begin

           FileName := Sender.RVData.GetNextFileName( 'img', Path, '.gif',

             Sender.imgSaveNo, True);

           TRXGifAnimator(SaveMe).Image.SaveToFile(FileName);

           FileName := ExtractRelativePath(Path, FileName);

           OutStr := Format('<IMG src="%s" width=%d height=%d>',

             [FileName, TControl(SaveMe).Width, TControl(SaveMe).Height]);

         end;

       end;

   end;

end;





Powered by ABC Amber Outlook Express Converter