ImageEn, unit iemview

TImageEnMView.Filter

TImageEnMView.Filter


Declaration

property Filter: String;


Description

Limit display to files whose name matches a specified filter or of a specified index If Filter is blank, all files are displayed.

Notes:
- When filtering is used the filtered frames are hidden from display but still available programatically
- For more control over filtering use OnFilter

File filtering is formatted as follows:
Value Description
*text* (or just "text") Matches filenames containing "text"
text* Matches filenames that start with "text"
*text Matches filenames that end with "text"

File Filtering Notes:
- Filtering is case-insensitive
- Folders are not filtered (use index filtering or OnFilter instead)
- Only the filename and its extension is assessed, not the path


Index filtering is formatted as follows:
Value Description
#0,2,5 Show thumbs 0, 2 and 5
#5-7 Show thumbs 5, 6 and 7
#10+ Show thumbs 10 and higher
#0,2,6-7,10+ Show thumbs 0, 2, 6, 7, 10, 11, 12...

Index Filtering Notes:
- Index filters must be prefixed by #
- Index values are zero-based, e.g. #0 shows only the first frame, #1 shows only the second frame
- Index values do NOT need to be ordered or exclusive, e.g. "#1-5, 3, 1" is acceptable



Demo

Demo  Demos\Multi\Filtering\Filtering.dpr


Example

// Display files containing "Italy"
IEFolderMView1.Filter := '*italy*';

// Display files that start with "Image"
IEFolderMView1.Filter := 'image*';

// Display any files ending in 2015
IEFolderMView1.Filter := '*2015.*';

// Display PNG files ending in 2015
IEFolderMView1.Filter := '*2015.png';

// Display PNG files
IEFolderMView1.Filter := '*.png';

// Display file of index 1 (Second thumbnail)
IEFolderMView1.Filter := '#1';

// Display files containing text #1
IEFolderMView1.Filter := '*#1*';

// Display file of index 0, 2, 6, 7, 10, 11, 15, 16, 17...
IEFolderMView1.Filter := '#0,2,6-7,10-11,15+';

// Clear the filter (show all files)
IEFolderMView1.Filter := '';


See Also

- ImageFiltered
- OnFilter
- UnfilteredCount