f_SelectDir.pas
上传用户:lcqxtx
上传日期:2013-02-15
资源大小:530k
文件大小:1k
- unit f_SelectDir;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, Buttons, ExtCtrls, FileCtrl;
- // ,FileCtrl, FileCtrl
- type
- TSelectDir = class(TForm)
- Panel_button: TPanel;
- Bevel_button: TBevel;
- BitBtn1: TBitBtn;
- BitBtn2: TBitBtn;
- PanelBkGnd: TPanel;
- Label1: TLabel;
- Label3: TLabel;
- Label2: TLabel;
- DirectoryListBox1: TDirectoryListBox;
- DriveComboBox1: TDriveComboBox;
- procedure BitBtn1Click(Sender: TObject);
- procedure BitBtn2Click(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- SelectDir: TSelectDir;
- implementation
- {$R *.dfm}
- procedure TSelectDir.BitBtn1Click(Sender: TObject);
- begin
- ModalResult := mrOK;
- end;
- procedure TSelectDir.BitBtn2Click(Sender: TObject);
- begin
- ModalResult := mrCancel;
- end;
- procedure TSelectDir.FormCreate(Sender: TObject);
- begin
- self.Caption := '选择目录'; //设置窗体标题
- DirectoryListBox1.DirLabel := Label3; //选择路径显示在Label3上面
- end;
- end.