//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "DirListBoxDrive.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------

// BeginExample: DirListBoxDrive
// Property: FileCtrl.TDirectoryListBox.Directory
// Property: FileCtrl.TDirectoryListBox.Drive
// Property: FileCtrl.TDriveComboBox.Drive
// Property: FileCtrl.TFileListBox.Directory
// Property: FileCtrl.TFileListBox.Drive
// Event: FileCtrl.TDirectoryListBox.OnChange
// Event: StdCtrls.TCustomCombo.OnChange

// BeginCode
/*
The following example assumes that a drive combo box, a file
list box, and a directory list box are on a form. Add this
code as the OnChange event handler for the drive combo box
and the OnChange event handler for the directory list box.
When the user changes the drive using the combo box, the
directory list box and file list box will update to reflect
the new drive and the current directory on that drive.  When
the user double clicks on a directory in the file list box
will update to reflect the new directory.
*/
void __fastcall TForm1::DriveComboBox1Change(TObject *Sender)
{
  DirectoryListBox1->Drive = DriveComboBox1->Drive;
  FileListBox1->Drive = DriveComboBox1->Drive;
  FileListBox1->Directory = DirectoryListBox1->Directory;
}

void __fastcall TForm1::DirectoryListBox1Change(TObject *Sender)
{
  FileListBox1->Directory = DirectoryListBox1->Directory;
}
// EndCode
// EndExample: DirListBoxDrive
//---------------------------------------------------------------------------

