ImageEn, unit imageenview |
|
TImageEnView.LayersNameToIndex
Declaration
function LayersNameToIndex(const Name: string; MatchCase: Boolean = True): Integer;
Description
Returns the index of the layer with a matching
Name.
Parameter | Description |
Name | The layer name to locate |
MatchCase | If true, searches are case sensitive |
// Make layer named "Best Layer" the active layer
idx := ImageEnView1.LayersNameToIndex( 'Best Layer', False );
if idx < 0 then
ShowMessage( 'Layer not found!' )
else
ImageEnView1.LayersCurrent := idx;
// Delete a layer of a specific name (if found)
ImageEnView1.LayersRemove( ImageEnView1.LayersNameToIndex( 'Delete Me' ));