ImageEn, unit imageenview

TImageEnView.OnLayerSelectionChange

TImageEnView.OnLayerSelectionChange


Declaration

property OnLayerSelectionChange: TNotifyEvent;


Description

Occurs whenever a layer is selected or deselected. Unlike OnLayerNotifyEx, this fires even with programmatic changes to selection.

A selected text layer:


Four selected layers:




Example

procedure TfrmMain.IEView1LayerSelectionChange(Sender: TObject);
begin
  // Enable the cut and copy buttons if layer cut/copy is possible
  btnCut.Enabled := IEView1.Proc.CanCutFromClipboard( iecpLayer );
  btnCopy.Enabled := IEView1.Proc.CanCopyFromClipboard( iecpLayer );
end;


Compatibility Information

Prior to v8.0.0, OnLayerSelectionChange only occured on user generated selections. With 8.0.0 it occurs even with programmatic changes of selection too. Use OnLayerNotifyEx if you only want user generated changes.


See Also

OnLayerNotifyEx
OnNewLayer