T O P I C R E V I E W |
andyhill |
Posted - Aug 25 2022 : 21:47:53 I have many text layers
procedure TfMain.ImageEnView1LayerNotifyEx(Sender: TObject; layer: Integer; event: TIELayerEvent);
...
for i:= 0 to ImageEnView1.LayersCount-1 do begin ALayer:= ImageEnView1.Layers[i]; if ( (ALayer.Locked = False) and (ALayer.Selected = True) and (ALayer.Kind = ielkText) ) then begin
do my thing
ImageEnView1.Deselect; // ImageEnView1.LockUpdate; ImageEnView1.LayersRemove(i); // throws errors ? // ImageEnView1.UnlockUpdate; ImageEnView1.Update();
Andy |
2 L A T E S T R E P L I E S (Newest First) |
xequte |
Posted - Aug 28 2022 : 00:20:33 Yes, as Kolio states. Iterate downward.
Nigel Xequte Software www.imageen.com
|
kolio |
Posted - Aug 26 2022 : 13:36:05 try for i:= ImageEnView1.LayersCount-1 downto 0 .... |