Yes, I always use the OnRequestHTTPImage event, except in one place where I can't (which I won't get into). I tried to find that event in the hint stuff earlier, but for some reason could not find it. With your instruction I easily found it this time and set up the event but it still does not work. Debugging shows that the event is invoked and the image is loaded into the TextObject, but it is not showing up in the hint. Below is the same code I use in my RapidRemark manager which works for a WPRichText.
Code
procedure TfrmWhisperReporter.RRHintRequestHTTPImage(
RTFData: TWPRTFDataCollectionBase; Reader: TWPCustomTextReader;
const LoadPath, url: string; TextObject: TWPTextObj; var Ok: Boolean);
var
vImage: TRapidRemarkImage;
vImageName: String;
begin
if fRapidRemarkHintID <= 0 then exit;
if (TextObject.ObjRef <> nil) and (TextObject.ObjRef.StreamName <> '') then
vImageName := TextObject.ObjRef.StreamName
else if url <> '' then
vImageName := url
else if TextObject.ObjType = wpobjImage then
vImageName := TextObject.Source;
if vImageName = '' then exit;
vImage := TRapidRemarkImage.Create();
try
if not vImage.LoadBy(fRapidRemarkHintID, vImageName) then exit;
TextObject.LoadObjFromStream(ExtractFileExt(vImage.Name), vImage.Image);
finally
FreeAndNil(vImage);
Ok := true;
end;
end;
Alles anzeigen
It is invoked this way: