[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'FileCtrl' (#lcl)

TCustomFileListBox.Drive

The Drive on which the file is located (applies to Windows systems).

Declaration

Source position: filectrl.pp line 73

public property TCustomFileListBox.Drive : Char
  read FDrive
  write SetDrive
  default ' ';

Description

Drive is a Char property which indicates the current drive letter for the Directory in the list box control. Drive is relevant for file systems which use drive designations (Windows).

The default value for the property is ' ' (space character). Changing the value in Drive causes the UpdateFileList method to be called to fill the list of Items displayed in the list box control.

Use Directory to specify the path on the local file system to the entries displayed in the control.

Remark: Setting a new value in Drive does not automatically alter the value in Directory. Always assign an explicit value to Directory when setting the value in Drive. In addition, setting a value in Directory which includes a drive designator like 'd:\config\' does not update the value in Drive. The only time Drive is automatically sync'd to the value in Directory is in the Create constructor.

Version 4.0 Generated 2025-05-03 Home