TCustomFileListBox.IndexOfFile function
Gets the ordinal position for the specified file name in Items.
Declaration
function IndexOfFile(const AFilename: string): IntegerArguments
AFilename | File name to locate in Items. |
Function result
Ordinal position in Items for the specified file name, or -1 when not found.
Description
IndexOfFile is an Integer function used to get the ordinal
position for the specified file name in the list of file names in the
control.
AFilename contains the file name to locate in the method.
IndexOfFile handles drive and volume entries that may be stored in
Items by ignoring the square brackets ([]) used to surround
values with the corresponding file attributes. The
CompareFileNames routine from LazFileUtils is used to
perform file name comparisons.
The return value is -1 when AFilename is not stored in the Items property.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
