ImageEn, unit iexLayers

TIELayer.Name

TIELayer.Name


Declaration

property Name: String;


Description

Specifies a name for the layer. If name is specified it is displayed in the Layer viewer
You can also search for layers by name using LayersNameToIndex.

Note: ImageEn does not check that the specified name is unique. I.e. it is permitted to use the same name on multiple layers


Examples

procedure TfrmMain.ievMainLayerNotifyEx(Sender: TObject; layer: Integer; event: TIELayerEvent);
begin
  // Give each layer a date based name
  if event = ielCreated then
    ievMain.Layers[layer].Name := 'Layer created at ' + DateTimeToStr( now );
end;

// Remove layer of a specific name
for i := ImageEnView1.LayersCount - 1 downto 1 do
  if SameText( ImageEnView1.Layers[ i ].Name. aDelName ) then
  begin
    ImageEnView1.LayersRemove( i );
    Break;
  end;


See Also

 GetDefaultName
 LayersNameToIndex