Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
yogiyang
Posted - Jun 16 2016 : 05:14:37 Hello,
I have set LayerOptions to loAllowMultiSelect and loAutoSelectMask. This will automatically select Mask Layer when we select a normal layer. This is just fine.
But under some situations I would want to prevent ImageEn from selecting the Mask Layer. Like for example when a user presses Ctrl Key and clicks on a Layer the mask layer if associated with that layer should not get selected so when the user moves or resizes layer the mask should not move or resize with it.
Is it possible to do this?
If Yes then any ideas as to how to do this please.
TIA
Yogi Yang
3 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Jun 19 2016 : 20:15:42 Hi Yogi
The "Selectable" property is ignored if you have enabled loAutoSelectMask.
You are better to disable loAutoSelectMask and automatically select the layer mask yourself when the user clicks a layer.
if (layer > 0) and (layer < (ievMain.LayersCount - 1)) then
begin
if ievMain.Layers[layer + 1].IsMask then
begin
ievMain.Layers[layer + 1].Selectable := False;
end;
end;
I am saying this because when I move or resize an Image the mask is also getting resized!
TIA
Yogi Yang
xequte
Posted - Jun 16 2016 : 18:48:28 Hi Yogi
Using the OnLayerNotify event you should be able to detect the selection of the mask layer and immediately deselect it: