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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Selectable

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
pierrotsc Posted - Sep 14 2015 : 09:00:02
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
2   L A T E S T    R E P L I E S    (Newest First)
pierrotsc Posted - Sep 14 2015 : 10:53:34
I understand now. Let me try to add the popup instead of having the checkbox.
Thanks.
w2m Posted - Sep 14 2015 : 10:31:47
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