My problem is that OnLayerNotify is not fired with my settings which is MouseInteract := [miSelect]. I do not want to use miMoveLayers.
I have a background with various icons and would like to react if the user clicks on any of the layers (icons)
Regards Eric
w2m
Posted - Sep 23 2012 : 14:42:33 The OnLayerNotify event occurs whenever a layer is selected, moved or resized.
procedure TForm1.ImageEnView1LayerNotify(Sender: TObject; layer: Integer; event: TIELayerEvent);
var
iDimensions: string;
begin
if event = ielSelected then
begin
// user selected a layer
// layer is the layer index of the selected layer
// to get layer info look at layer property
// you can get the layers width, height, position...
iDimensions := IntToStr(ImageEnView1.Layers[layer].Width) + ' pixels x ' + IntToStr(ImageEnView1.Layers[layer].Height) + ' pixels';
end;
end;