ImageEn, unit iexFolderTree

TIEFileListBox.SortOptions

TIEFileListBox.SortOptions


Declaration

property SortOptions: TIEMSortOptions;


Description

Provides options for the sorting the file list.
Value Description
iesDescending Sorting is reversed, e.g. instead of A-Z, it sorts Z-A
iesCaseSensitive Casing of filenames/captions affects sorting, e.g. "TEXT" and "text" are treated as different with lowercase text having priority
iesNaturalSorting Considers digits in filenames when sorting, e.g. img1.jpg, img10.jpg, img11.jpg, img2.jpg will be sorted as img1.jpg, img2.jpg, img10.jpg, img11.jpg (Delphi XE2 or newer)

Note: Requires Delphi/BCB XE6 or newer


Examples

// Toggle the sort direction
if iesDescending in IEFileListBox1.SortOptions then
  IEFileListBox1.SortOptions := IEFileListBox1.SortOptions - [iesDescending]
else
  IEFileListBox1.SortOptions := IEFileListBox1.SortOptions + [iesDescending];

// Sort by filename considering any digits within the name
// e.g. img1.jpg, img10.jpg, img11.jpg, img2.jpg, img20.jpg will be sorted as img1.jpg, img2.jpg, img10.jpg, img11.jpg, img20.jpg
IEFileListBox1.SortOptions := [iesNaturalSorting ];