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
 Setting Layer properties at creation?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

914 Posts

Posted - Feb 29 2024 :  04:26:32  Show Profile  Reply
I create a Rectangle Shape Layer with this code:

procedure TformPreview.DoCreateRectangleShape;
begin
  ImageEnViewPreview.LayersAdd(
    iesRectangle,
    Rect(
      10,   // Left
      10,   // Top
      100,  // Right
      100), // Bottom
    clRed, 5);
  ImageEnViewPreview.CurrentLayer.Selected := True; // select this layer: does not work
end;


However, the layer is not selected!

And how to set the layer's inherent properties, such as Moveable, Sizeable, and Rotateable, without having to mess around with MouseInteractLayers?

xequte

38457 Posts

Posted - Feb 29 2024 :  14:18:55  Show Profile  Reply
Hi Peter

New layers are selected by default.

Have you looked at the layers demo?

\Demos\LayerEditing\Layers_AllTypes\Layers.dpr

You can lock a layer using:

https://www.imageen.com/help/TIELayer.Locked.html


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: