ImageEn, unit imageenview

TImageEnView.OnImageChange

TImageEnView.OnImageChange


Declaration

property OnImageChange: TNotifyEvent;


Description

Occurs after the image is modified using TImageEnProc (Proc property) or TImageEnIO (IO property).

If you are using multiple Layers, then layer changes will also trigger OnImageChange.

Note:
 This event is triggered by editing methods in TImageEnProc or in TImageEnView (e.g. Clear). Not by changes to the IEBitmap
 TImageEnProc calls ImageChange after a modification which actuates OnImageChange.
 The OnImageChangeEx event is also available, which is the same except that it includes a parameter showing whether the change is due to the image or layers


Example

procedure TForm1.ImageEnView1ImageChange(Sender: TObject);
begin
  // Update status of buttons
  btnSave.Enabled := ImageEnView1.IEBitmap.Modified;
  btnUndo.Enabled := ImageEnView1.Proc.CanUndo;
  btnRedo.Enabled := ImageEnView1.Proc.CanRedo;
end;


See Also

 TImageEnView.Modified
 TIEBitmap.Modified
 TIELayer.Modified
 OnImageChangeEx
 OnLayerNotify