ImageEn, unit iexFolderMView

TImageEnFolderMView.SubFolderLimit

TImageEnFolderMView.SubFolderLimit


Declaration

property SubFolderLimit: Integer;


Description

Specifies the maximum number of folder that are checked for content when IncludeSubFolders is enabled.
Retrieving sub-folders can be slow, particularly when selecting a root drive such as "C:". SubFolderLimit allows you to prevent locking up your UI for a long period.
SubFolderLimit also specifies a maximum value for OnProgress when retrieving folders.
Set SubFolderLimit to 0 to retrieve all sub-folders.

Default: 1000

Notes:
- Changing this property will not affect the current content. The change will occur next time the folder is refreshed.
- You can also prevent further addition of sub-folders by setting IEFolderMView1.MIO.Aborting := True; in OnProgress


Examples

// Disable the sub-folder limit (can take a long time if parsing a very large drive)
IEFolderMView1.SubFolderLimit := 0;

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


See Also

- IncludeSubFolders
- FileLimit