ImageEn, unit iemview

TImageEnMView.FillFromDirectory

TImageEnMView.FillFromDirectory


Declaration


procedure FillFromDirectory(const Directory: WideString;
                            FileTypes: TIEFolderFileTypes;
                            const FilterMask : WideString = '';
                            LoadOnDemand : boolean = true;
                            DefaultTopText : TIEImageEnMViewDefaultText = iedtNone;
                            DefaultInfoText : TIEImageEnMViewDefaultText = iedtNone;
                            DefaultBottomText : TIEImageEnMViewDefaultText = iedtFilename;
                            bShowHiddenFiles : Boolean = False;
                            bShowFolders : Boolean = False); overload;
procedure FillFromDirectory(const Directory: WideString; Limit : integer = -1; AllowUnknownFormats : boolean = false; const ExcludeExtensions : WideString = '';
                            DetectFileFormat : boolean = false; const FilterMask : WideString = ''; IncludeVideoFiles : Boolean = False;
                            LoadOnDemand : boolean = true;
                            DefaultTopText : TIEImageEnMViewDefaultText = iedtNone;
                            DefaultInfoText : TIEImageEnMViewDefaultText = iedtNone;
                            DefaultBottomText : TIEImageEnMViewDefaultText = iedtFilename;
                            bShowHiddenFiles : Boolean = False;
                            bShowFolders : Boolean = False;
                            FilenameFilter: string = ''); overload;


Description


Fills the ImageEnMView with files from the specified Directory. For each file ImageFileName will be set with the full path and ImageBottomText with the filename.
You can cancel the insertion of files by setting MIO.Aborting := True;

Parameter Description Default
Directory The folder to search for files Required
FileTypes Specify the types of files to include  
Limit The maximum number of images to load. Use -1 to retrieve all files -1
AllowUnknownFormats If false (default) only known and supported file formats are loaded. Otherwise all files are loaded False
ExcludeExtensions A comma separated list of file extensions to skip (e.g. 'lyr,all,iev') ''
DetectFileFormat If true then the image type is detected by reading the header (which can be slow). Otherwise ImageEn only checks the file extension False
FilterMask Limits the fill to file extensions found in a comma separated list (e.g. 'jpg,jpeg,jpe'). Specify an empty string to return all supported extensions ''
bIncludeVideoFiles If AllowUnknownFormats is false then video files are excluded by default. Set to true to include supported video file types such as AVI and MPEG. Thumbnails for video files will be retrieved from Windows Explorer if the format is specified in MViewExplorerThumbnailExts False
LoadOnDemand If True (Default), images are only loaded as they are displayed (i.e. not until they are scrolled into view). Set to false to load all images immediately True
DefaultTopText Specify the text that is applied to ImageTopText iedtNone
DefaultInfoText Specify the text that is applied to ImageInfoText iedtNone
DefaultBottomText Specify the text that is applied to ImageBottomText iedtFilename
bShowHiddenFiles Enable to include hidden and system files False
bShowFolders Enable to include folders False
FilenameFilter Limits the file to filenames that contain text specified by FilenameFilter (see FilenameFilter for more detail) ''


Notes:
- Does NOT clear existing content. Use Clear first to replace existing content
- More functionality for the display of thumbnails of file folders is available with TImageEnFolderMView.


Demo


  Demos\Multi\Thumbnails\Thumbnails.dpr



Examples


ImageEnMView1.Clear;

ImageEnMView1.FillFromDirectory( 'C:\Images\' );

// Which is the same as:
ImageEnMView1.FillFromDirectory( 'C:\Images\', iefAllImages );

// Get images and videos
ImageEnMView1.FillFromDirectory( 'C:\Images\', iefAllImagesAndVideos );

// Get all files
ImageEnMView1.FillFromDirectory( 'C:\Images\', iefAllFiles );

// Get only JPEG images
ImageEnMView1.FillFromDirectory( 'C:\Images\', iefCustom, '*.jpg;*.jpeg;' );


See Also


- AppendImage
- InsertImage
- FillFromList