ImageEn, unit iemview

TImageEnMView.OnViewChange

TImageEnMView.OnViewChange


Declaration

property OnViewChange: TViewChangeEvent;


Description

Occurs when the ViewX, ViewY or Zoom properties change due to user interaction.


Example

procedure TMyForm.ImageEnMViewOnViewChange(Sender: TObject; Change: integer);
begin
  // Restrict zoom to range of 50 - 200
  if ( Change = 1 ) and ( Zoom < 50 ) then
    Zoom := 50
  else
  if ( Change = 1 ) and ( Zoom > 200 ) then
    Zoom := 200;
end;