ImageEn, unit imageenio

TIEImageSeekEvent


Declaration

  TIEImageSeekEvent = procedure(Sender: TObject; Destination: TIEIOSeekDestination; const FileName: WideString; var NewIndex: integer) of object;


Description

Used by OnImageSeek to control behavior for Seek calls.


Examples

procedure TForm1.ImageEnView1ImageSeek(Sender: TObject; Sender: TObject; Destination: TIEIOSeekDestination; const FileName: WideString; var NewIndex: integer);
begin
  // Don't show page 5
  if NewIndex = 5 then
    case Destination of
      ieioSeekPrior : NewIndex := 4;
      ieioSeekNext  : NewIndex := 6;
    end;
end;

procedure TForm1.ImageEnView1ImageSeek(Sender: TObject; Sender: TObject; Destination: TIEIOSeekDestination; const FileName: WideString; var NewIndex: integer);
begin
  // Do not allow page to be changed
  if chkPageLocked.Checked then
    NewIndex := ImageEnView1.IO.Params.ImageIndex;
end;