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
 Problem with groupindex?

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
AdrianKnowles Posted - Sep 14 2023 : 10:47:08
Hi,
I'm creating 4 layers (in 2 different procedures) and want to group them
so something like this

Procedure 1
With LineTestImageEnView do
begin
LockUpdate();
Layers[ 1 ].GroupIndex := 333;
Layers[ 2 ].GroupIndex := 333;
UnlockUpdate();
end;

Procedure 2
With LineTestImageEnView do
begin
LockUpdate();
Layers[ 3 ].GroupIndex := 666;
Layers[ 4 ].GroupIndex := 666;
UnlockUpdate();
end;

Layers 3 & 4 are correctly assigned to groupindex 666 but not 1 & 2(groupindex is zero)

I was wondering if there was something I'm missing?

Kind regards,
Adrian
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Sep 15 2023 : 17:45:19
Hi Adrian

Are you sure? Are you checking Layer[n].GroupIndex or CurrentLayer.GroupIndex (as the layer index has changed). There are actually very few things that will automatically reset GroupIndex.

Nigel
Xequte Software
www.imageen.com
AdrianKnowles Posted - Sep 14 2023 : 17:09:30
Hi Nigel,
I think I've narrowed it down.

The groupindex's are successfully created. Checked with your showmessage code below.

I then used the following to enable to move the group

LineTestImageEnView.MouseInteractLayers:= [miMoveLayers];

I can move the group and the group index is still correct. Checked with your showmessage code below.

However If I click off the group (just onto the background image) then the groupindex changes to zero and you can then only select the individual layers.

Also if i dont click on the background but click on a button with the following code

LineTestImageEnView.MouseInteractLayers := [];
Then the groupindex changes to zero.

Repeating
LineTestImageEnView.MouseInteractLayers:= [miMoveLayers];
Highlights the layers but the groupindex is still zero.

Kind regards,
Adrian

xequte Posted - Sep 14 2023 : 15:02:53
Hi Adrian

I think something else might be going on here.

I assume the following returns the expected values?

With LineTestImageEnView do
  ShowMessage( Layers[ 1 ].GroupIndex.ToString + '/' + Layers[ 3 ].GroupIndex.ToString );

With LineTestImageEnView do
begin
  LockUpdate();
  Layers[ 1 ].GroupIndex := 333;
  Layers[ 2 ].GroupIndex := 333;
  UnlockUpdate();
end;

With LineTestImageEnView do
  ShowMessage( Layers[ 1 ].GroupIndex.ToString + '/' + Layers[ 3 ].GroupIndex.ToString );

With LineTestImageEnView do
begin
  LockUpdate();
  Layers[ 3 ].GroupIndex := 666;
  Layers[ 4 ].GroupIndex := 666;
  UnlockUpdate();
end;

With LineTestImageEnView do
  ShowMessage( Layers[ 1 ].GroupIndex.ToString + '/' + Layers[ 3 ].GroupIndex.ToString );



Nigel
Xequte Software
www.imageen.com