ImageEn, unit iexFolderMView |
|
TImageEnFolderMView.InsertFile
Declaration
function InsertFile(idx : Integer; const sFilename : string; bSelectIt : Boolean = True; bCheckFileType : Boolean = True) : Boolean;
Description
InsertFile adds a new file at the specified position in the grid. If
bSelectIt is enabled the new file will be selected.
If
bCheckFileType is enabled then the file is only added if it is permitted by folder parameters:
FileTypes,
FileTypesMask,
ExclusionMask,
ShowFolders and
ShowHiddenFilesResult is False if the file does not exist.
Note:
◼Unlike the
InsertImage methods, the added file will be loaded on demand and filled with the details and properties of TImageEnFolderMView- After adding many files you may want to call
RefreshSorting◼You can use
RefreshFileList to update the content if files change on the system (i.e. missing files will be removed from the control)
// Add file to the start of the list
IEFolderMView1.Add(0, 'D:\MyNewImage.jpg');
// Add folder (just the folder icon, not the files it contains)
IEFolderMView1.Add(0, 'D:\My Images\');
See Also
◼InsertImage◼AppendFile◼FillFromDirectory