ImageEn, unit imageenview

TImageEnView.OnImageSeek

TImageEnView.OnImageSeek


Declaration

property OnImageSeek: TIEImageSeekEvent;


Description

Occurs when Seek is called (for the attached IO). This can occur automatically in certain situations:
 Buttons are enabled and the user clicks "Previous" or "Next"
 The PdfViewer is enabled and the user clicks a navigation key, such as PageUp or PageDown

You can use the disable the seek method or skip certain pages.


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;


See Also

 Seek
 ShowButtons