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
 Visual indication of Grouped Layers?

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
PeterPanino Posted - May 24 2023 : 16:34:58
The documentation says: "A GroupIndex of 0 means the layer is not grouped."

So this means: A GroupIndex > 0 means the layer is grouped. Is this correct?

Is it possible to get a visual indication of Layers that are grouped? (I.e., Layers with a GroupIndex > 0, e.g., a Group icon).
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 08 2023 : 23:44:49
FYI, in the next update a "Link" glyph is shown in the corner of selected layers of the same group.


Nigel
Xequte Software
www.imageen.com
xequte Posted - May 25 2023 : 17:47:06
Hi

You might want to use one the drawing events to add an icon to the layer:

http://www.imageen.com/help/TImageEnView.OnDrawLayer.html

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - May 25 2023 : 00:34:09
Hi Nigel,

Thank you for the information.

I wrote this code to TOGGLE the selected Layers between Grouped and UnGrouped modes:

procedure TformMain.ButtonToggleLayerGroupingClick(Sender: TObject);
begin
  // Iterate through all selected layers (except background):
  with ImageEnView1 do
  begin
    LockUpdate();
    try
      var ThisGroupIndex := Random(Max_Int);
      for var i := 1 to LayersCount - 1 do
      begin
        if Layers[i].Selected then
        begin
          if Layers[i].GroupIndex = 0 then // if Layer is UNGROUPED
            Layers[i].GroupIndex := ThisGroupIndex
          else // if Layer is GROUPED
            Layers[i].GroupIndex := 0;
        end;
      end;
    finally
      UnlockUpdate();
    end;
  end;
end;


But to select only Grouped or only Ungrouped Layers to toggle, the user needs a visual indication of whether a Layer is Grouped or not Grouped. Otherwise, this code could not work as intended. Otherwise, I would have to implement TWO buttons: One for Grouping and one for Ungrouping.

xequte Posted - May 24 2023 : 20:43:27
Hi Peter

Yes, GroupIndex > 0 means the layer is grouped. We'll look at adding a visual indication in a future version.


Nigel
Xequte Software
www.imageen.com