ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 remove layer by name
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pierrotsc

USA
497 Posts

Posted - Oct 30 2022 :  17:03:22  Show Profile  Reply
Is that possible ? I name my layers and would like to be able to delete the one with a certain name.
thanks
Pierre

xequte

38610 Posts

Posted - Oct 30 2022 :  17:25:05  Show Profile  Reply
Hi Pierre

You can use:

// Remove layer of a specific name
for i := ImageEnView1.LayersCount - 1 downto 1 do
  if SameText( ImageEnView1.Layers[ i ].Name. aDelName ) then
  begin
    ImageEnView1.LayersRemove( i );
    Break;
  end;


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Oct 30 2022 :  17:35:25  Show Profile  Reply
Nigel, thank you very much. Just what I needed. I was looking in the help file for a specific command :)
Best
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: