Class TDiskListView (unit DiskList)

Inherits from

TListView

This component provdies a ListView component that displays disk drives. As an added convenience to the user, fixed drives which are locally attached are automatically selected. This component scans the drives when it is inserted into a form so that the user can better size and judge the component. So that the user can scan drives (which might take a few moments) at a time when it is appropriate, the component does NOT scan drives when it first appears on a form. The user is expected to call the ScanDrives method. As each drive is selected, the OnChange event for the control may be captured to discover the current list of selected drives using the SelectedDrives function. The SelectedDrives function returns a string of selected drive letters e.g. CDE Finally, the SelectLocalDrives property enables the automatic selection of local disk drives during a call to ScanDrives. The behaviour of this component with differing ImageLists and ViewStyles has not been investigated. V1.0.0 1997 Mar 30 First version V1.0.2 1997 Apr 02 Move adding Columns to CreateWnd method (thanks, Brad Stowers) 1997 May 04 Remove a couple of unused variables V1.1.0 1997 May 13 Version for Delphi 3.0 Don't save compile-time demo data Remove yet another unused variable! (column_list) Define default value for SelectLocalDrives property Author: david.taylor@gecm.com

Constructors


constructor Create (AOwner: TComponent);

Public declarations

expected number of drives visible



Functions

procedure CreateWnd;


destructor Destroy;

a unique name required?

procedure ScanDrives;

scan down the list view of drives

function SelectedDrives: string;


Properties

property Items :


property SelectLocalDrives : boolean

Published declarations

Events

Variables

FSelectLocalDrives : boolean;


image_list : TImageList;

Private declarations


Constructors


constructor Create (AOwner: TComponent);

Public declarations

expected number of drives visible


Functions


procedure CreateWnd;


destructor Destroy;

a unique name required?


procedure ScanDrives;

scan down the list view of drives


function SelectedDrives: string;


Properties


property Items :


property SelectLocalDrives : boolean

Published declarations


Events


Variables


FSelectLocalDrives : boolean;


image_list : TImageList;

Private declarations