ImageEn, unit iexFolderMView

TImageEnFolderMView.IncludeSubFolders

TImageEnFolderMView.IncludeSubFolders


Declaration


property IncludeSubFolders: Boolean;


Description


When enabled, files within any sub-folders of Folder will be included.

Notes:
- IncludeSubFolders has no effect with special folders such as IEF_Desktop_Folder or IEF_Drives_Folder. It will also be slow if there are many sub-folders so use with caution.
- When IncludeSubFolders is enabled, you can use OnProgress to monitor folder filling, and set IEFolderMView1.MIO.Aborting := True; to cancel


Examples


// Retrieve JPEG images from all folders of an inserted DVD
IEFolderMView1.LockUpdate();
try
  IEFolderMView1.Folder := 'E:\';
  IEFolderMView1.IncludeSubFolders := True;
  IEFolderMView1.FileTypesMask := 'jpg,jpeg,jpe';
finally
  // Re-enable updating and refresh content
  IEFolderMView1.UnlockUpdate();
end;

// Show progress during fill, and handle user cancelling
procedure TForm1.IEFolderMViewProgress(Sender: TObject; per: Integer);
begin
  ProgressBar1.Position := per;
  Application.ProcessMessages;
  if fUserCancelled then
    IEFolderMView1.MIO.Aborting := True;
end;