Home

VCL Controls: The Drive Combo Box

   

Introduction

To assist you with visually getting the drives of a computer, the VCL provides the drive combo box. To get the drive combo box, in the Win 3.1 section of the Tool Palette, click the TDriveComboBox button Drive Combo Box and click a form (or other container). This would add the control:

 

Drive Combo Box

The drive combo box is represented in the VCL by the TDriveComboBox class. The TDriveComboBox class is defined in the FileCtrl.hpp header file.

Using a Drive Combo Box

To use a drie combo box, the user can click the down-pointing arrow of the control. This would display the list of drives:

Drive Combo Box

 

The user can then click the desired drive. To give you access to the drive that is currently selected, the TDriveComboBox class is equipped with a property named Drive:

__property wchar_t Drive = {read=GetDrive,write=SetDrive};

This property produces the letter of the drive that was selected or is displaying in the control.

 
 

Home Copyright © 2010-2016, FunctionX