📄 dirfile_unit.pas
字号:
unit dirfile_Unit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, FileCtrl;
type
TForm1 = class(TForm)
DriveComboBox1: TDriveComboBox;
DirectoryListBox1: TDirectoryListBox;
FileListBox1: TFileListBox;
FilterComboBox1: TFilterComboBox;
Edit1: TEdit;
procedure DriveComboBox1Change(Sender: TObject);
procedure DirectoryListBox1Change(Sender: TObject);
procedure FileListBox1Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.DriveComboBox1Change(Sender: TObject);
begin
DirectoryListBox1.Drive:=form1.DriveComboBox1.Drive;
end;
procedure TForm1.DirectoryListBox1Change(Sender: TObject);
begin
FileListBox1.Directory:=form1.DirectoryListBox1.Directory;
end;
procedure TForm1.FileListBox1Change(Sender: TObject);
begin
edit1.text:=filelistbox1.Directory+'\'+edit1.text;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
DriveComboBox1.Drive:='d';
DirectoryListBox1.Directory:='d:\';
FileListBox1.FileEdit:=Edit1;
FilterComboBox1.FileList:=FileListBox1;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -