ImageEn, unit iexLayers

TIELayer.GroupIndex

TIELayer.GroupIndex


Declaration


property GroupIndex: Integer;


Description


Specifies the Group ID of the layer. When a layer is selected all other layers with the same group ID are automatically selected too.
GroupIndex can be any value. A GroupIndex of 0 means the layer is not grouped.

Note: GroupIndex is only valid if multiple layer selection is enabled.


Example


// Group all layers (except background)
ImageEnView1.LockUpdate();
for i := 1 to ImageEnView1.LayersCount - 1 do
  ImageEnView1.Layers[ I ].GroupIndex := Random( Max_Int );
ImageEnView1.UnlockUpdate();

// Ungroup all layers
ImageEnView1.LockUpdate();
for i := 0 to ImageEnView1.LayersCount - 1 do
  ImageEnView1.Layers[ I ].GroupIndex := 0;
ImageEnView1.UnlockUpdate();


See Also


- LayersGroup
- LayersUngroup