I'm trying to use a TMSFNCImage in a Web Core application. I am adding it to a string grid and I want to later pickup which part of the image is clicked. I tried it out in the VCL first and used the OnMouseDown event which gave me what I wanted. However when using it in Web Core the XY that I am picking up is from the string grid not the actual button. I guess this is a bug and not a feature but just wanted to check before I handle it and find it gets fixed later.
var
img: TTMSFNCImage;
begin
img := TTMSFNCImage.Create( Self );
img.Parent := sgTruckStatus;
img.Width := 98;
img.Height := 30;
img.ElementPosition := epRelative;
img.DataString := AStatus;
img.Tag := ATag;
img.OnMouseDown := imgMouseDown;
case AStatus[ 1 ] of
'R': img.Bitmap := BitmapContainer1.Bitmaps[ 0 ];
'A': img.Bitmap := BitmapContainer1.Bitmaps[ 1 ];
'G': img.Bitmap := BitmapContainer1.Bitmaps[ 2 ];
end;
td.appendChild( img.ElementHandle );