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
 Selectable
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pierrotsc

USA
497 Posts

Posted - Sep 14 2015 :  09:00:02  Show Profile  Reply
I am looking at the layers demo. I have an image loaded and I added a blank layer. When i unselect the selectable checkbox on the new layer and i click on the main one, it is also not selectable anymore.
I thought that the selectable property was linked to the current layer and would not affect the other layers. am I wrong?
Thanks.
Pierre

w2m

USA
1990 Posts

Posted - Sep 14 2015 :  10:31:47  Show Profile  Reply
Yes you are correct, making a layer selectable or not, only affects the selected layer. In order for a layer to appear selected the layer must be unlocked (CurrentLayer.Locked := False), selectable must be true (CurrentLayer.Selectable := True) and VisibleBox must be true (CurrentLayer.VisibleBox := True).

But even then, you can not make as layer selectable again if you make the layer not selectable, because once you do, there is no way to select the layer to make the layer selectable again once you set the layers Selectable to False, because the layer can not be selected to make the layer selectable again.

You can add a popupmenu to TImageEnMView which toggles selectability of a layer off and on, so this works for any layer selected in ImageEnMView:
procedure Tfmain.Selectable1Click(Sender: TObject);
{ Toggle a layer s selectability }
begin
   with ImageEnView1 do
  begin
    Layers[ImageEnMView1.SelectedImage].Selectable := not Layers[ImageEnMView1.SelectedImage].Selectable;
    Layers[ImageEnMView1.SelectedImage].Locked := False;
    Layers[ImageEnMView1.SelectedImage].VisibleBox := True;
    Update;
  end;
end;


So to make a layer selected and to have the layers grips appear, three parameters must be true. The layer must be selectable and unlocked, and visiblebox must be true.


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Sep 14 2015 :  10:53:34  Show Profile  Reply
I understand now. Let me try to add the popup instead of having the checkbox.
Thanks.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: