trichview.support
OnsavecomponenttoFile event |
Author |
Message |
Allen |
Posted: 02/21/2003 12:03:12 Hello, I want to use the onsavecomponenttofile event to save a gif. How do I change the following codes: ================================ procedure TMyForm.MyRichViewSaveComponentToFile(Sender: TRichView; Path: String; SaveMe: TPersistent; SaveFormat: TRVSaveFormat; var OutStr: String); var bmp: TBitmap; ImageFileName: String; begin rvsfHTML: begin if SaveMe is TButton then OutStr := '<FORM><INPUT type="button"' + 'value="' + TButton(SaveMe).Caption + '" onClick="alert(''Test'')"></FORM>'; else if SaveMe is TImage then begin bmp := TBitmap.Create; bmp.Height := TImage(SaveMe).Height; bmp.Width := TImage(SaveMe).Width; bmp.Canvas.Draw(0,0, TImage(SaveMe).Picture.Bitmap); ImageFileName := MyRichView.SavePicture(SaveFormat,Path,bmp); OutStr := '<IMG src="'+ImageFileName+'" alt='+ TImage(SaveMe).Hint+'>'; bmp.Free; end; end; end; end; ================================ Thanks for your coaching. |
Powered by ABC Amber Outlook Express Converter