[Overview][Types][Classes][Procedures and functions][Index] |
Loads the list of files and/or directories for the list box control.
Source position: filectrl.pp line 71
public procedure TCustomFileListBox.UpdateFileList; virtual; |
UpdateFileList is a method used to load the list of file and/or directory names in the Items for the control. No actions are performed in the method at design-time, or when the component is being loaded using the LCL streaming mechanism.
UpdateFileList calls Clear to remove any existing values in the Items property.
Values in FileType are used to construct file attributes needed for use with TSearchRec. The FindFirstUTF8 and FindNextUTF8 routines from LazFileUtils are used to find matching file or directory names in the Directory for the control. Each value returned for the TSearchRec is compared to the Mask and FileType defined in the control. Acceptable values are added to the Items property.
Please note that Directory names (included when FileType contains ftDirectory) are surrounded by square brackets ('[]') when added to the Items property.
The private UpdateSelectedFileName method is called to include path information in FileName for the selected item in the control.
UpdateFileList is called in the implementation of the Create and Loaded methods. It is also called when a new value is assigned to Drive, Directory, FileType, or Mask.
|
The Directory or Folder in which the file is located. |
|
|
FileName - the name of the selected file. |
|
|
FileType - the type or attributes of the selected file. |
|
|
The list of all items defined in the control. |
|
|
Removes all items from the list box control. |
Version 4.0 | Generated 2025-05-03 | Home |