ImageEn, unit iemview

TImageEnMView.ImageFiltered

TImageEnMView.ImageFiltered


Declaration

property ImageFiltered[idx: Integer]: integer;


Description

Returns true if image idx is hidden due to the FilenameFilter property or OnFilter event.

Read-only


Demo

Demo  Demos\Multi\Filtering\Filtering.dpr


Example

// Show all unfiltered filenames
procedure TMainForm.btnShowUnfilteredClick(Sender: TObject);
const
  Max_Display_Count = 20;
var
  fileNames: string;
  cnt: Integer;
  I: Integer;
begin
  fileNames := '';
  cnt := 0;
  for I := 0 to ImageEnMView1.ImageCount - 1 do
    if not ImageEnMView1.ImageFiltered[I] then
    begin
      // Or ImageEnMView1.ImageFilename[I] to output the filename
      fileNames := fileNames + #13#10 + ExtractFilename(ImageEnMView1.ImageFilename[I]);
      inc(cnt);
      if cnt > Max_Display_Count then
      begin
        fileNames := fileNames + #13#10 + '...';
        break;
      end;
    end;

  if fileNames = '' then
    ShowMessage('No files are visible')
  else
  if ImageEnMView1.UnfilteredCount = ImageEnMView1.ImageCount then
    ShowMessage(format('All %d files are visible:', [ImageEnMView1.UnfilteredCount]) + #13#10 + fileNames)
  else
    ShowMessage(format('%d files are unfiltered:', [ImageEnMView1.UnfilteredCount]) + #13#10 + fileNames);
end;


See Also

- FilenameFilter
- OnFilter
- UnfilteredCount