home *** CD-ROM | disk | FTP | other *** search
/ Delphi 4 Bible / Delphi_4_Bible_Tom_Swan_IDG_Books_1998.iso / source / DIREX / Dirdlg.pas < prev    next >
Pascal/Delphi Source File  |  1998-04-10  |  1KB  |  51 lines

  1. unit Dirdlg;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, Windows, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, Buttons, FileCtrl;
  8.  
  9. type
  10.   TDirDlgForm = class(TForm)
  11.     FileListBox: TFileListBox;
  12.     DirectoryListBox: TDirectoryListBox;
  13.     DriveComboBox: TDriveComboBox;
  14.     FilterComboBox: TFilterComboBox;
  15.     FileNameEdit: TEdit;
  16.     FileNameLabel: TLabel;
  17.     DirectoriesLabel: TLabel;
  18.     DirLabel: TLabel;
  19.     ListFilesLabel: TLabel;
  20.     DrivesLabel: TLabel;
  21.     OkBitBtn: TBitBtn;
  22.     CancelBitBtn: TBitBtn;
  23.     procedure FileListBoxDblClick(Sender: TObject);
  24.     procedure DriveComboBoxChange(Sender: TObject);
  25.   private
  26.     { Private declarations }
  27.   public
  28.     { Public declarations }
  29.   end;
  30.  
  31. var
  32.   DirDlgForm: TDirDlgForm;
  33.  
  34. implementation
  35.  
  36. {$R *.DFM}
  37.  
  38. procedure TDirDlgForm.FileListBoxDblClick(Sender: TObject);
  39. begin
  40.   OkBitBtn.Click;  { Simulate OK button click }
  41. end;
  42.  
  43. procedure TDirDlgForm.DriveComboBoxChange(Sender: TObject);
  44. begin
  45.   DirectoryListBox.Drive := DriveComboBox.Drive;
  46.   FileListBox.Drive := DriveComboBox.Drive;
  47.   FileListBox.Directory := DirectoryListBox.Directory;
  48. end;
  49.  
  50. end.
  51.