In a Delphi 10.4.2 32-bit VCL Application, I use the component TSVGIconImage
from the SVGIconImageList library from the GetIt PackageManager.
Although the component supports the OnDblClick
event-handler, it does NOT support the OnMouseDown
event-handler! I.e., I can add an OnMouseDown
event-handler by double-clicking the OnMouseDown
event in the Object Inspector, however that event-handler gets never called at run-time:
procedure TformMain.SVGIconImage1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
CodeSite.Send('called!'); // never called!
end;
The TSVGIconImage
component is declared in SVGIconImage.pas
as:
TSVGIconImage = class(TCustomControl)
So shouldn't the TSVGIconImage
component inherit its OnMouseDown
event from TCustomControl
?
Anyway, how can I add a working OnMouseDown
event for TSVGIconImage
in my application's code?
EDIT: After testing this in a separate VCL Application I found out that the
TSVGIconImage
OnMouseDown event handler is working there at run-time. So it must be something else that blocks the TSVGIconImage
OnMouseDown event handler in my application. I have still to find out the cause.
OnMouseDown
event-handler in my application code? – user1580348TCustomControl
that would explain why theOnMouseDown
doesn't work. So, I somewhat reluctantly downloaded the library using GetIt. After quite a few errors (like the demo project not being runnable because a published property isn't found), I made a small demo app using theTSVGIconImage
. My first impression is that this is not a very good SVG renderer: it is by far the slowest SVG renderer I have ever seen, and it doesn't render my math graphs correctly. Still, theOnMouseDown
handler works for me! – Andreas Rejbrand