Delphi 资源管理器套件
2021-04-29 23:46
2071 查看
Delphi 资源管理器套件
需要个类似资源管理器的东西, 首先试了下 TDriveComboBox、TDirectoryListBox、TFileListBox, 嘿! Win31 时代的东西, 不是一般地丑.
试了下 Vcl.Shell.ShellCtrls 下的 TShellComboBox、TShellTreeView、TShellListView, 非常满意! 并且 TShellComboBox 也可以免掉了.
unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.FileCtrl, Vcl.StdCtrls, Vcl.ComCtrls; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private procedure TreeViewOnChange(Sender: TObject; Node: TTreeNode); public end; var Form1: TForm1; implementation {$R *.dfm} uses Vcl.Shell.ShellCtrls; var C: TShellComboBox; T: TShellTreeView; L: TShellListView; procedure TForm1.FormCreate(Sender: TObject); begin C := TShellComboBox.Create(Self); T := TShellTreeView.Create(Self); L := TShellListView.Create(Self); C.Parent := Self; T.Parent := Self; L.Parent := Self; T.Width := Screen.Width div 4; C.Align := alTop; T.Align := alLeft; L.Align := alClient; T.ShellComboBox := C; L.ShellTreeView := T; L.ViewStyle := vsList; T.OnChange := TreeViewOnChange; end; procedure TForm1.TreeViewOnChange(Sender: TObject; Node: TTreeNode); begin Caption := T.SelectedFolder.PathName; end; end.
相关文章推荐
- Delphi 的链式代码
- Delphi 正则表达式语法(10): 选项
- Delphi XE2 之 FireMonkey 入门(34) - 控件基础: TFmxObject: 克隆对象
- Delphi 正则表达式之TPerlRegEx 类的属性与方法(1): 查找
- Delphi 中的自动释放策略
- XP 之后, Delphi 动注册表不方便了...逼出来一个办法:
- Delphi 正则表达式之TPerlRegEx 类的属性与方法(7): Split 函数
- Delphi中获取Unix时间戳(秒、毫秒)
- 论文学习心得 DELPHI: A Cryptographic Inference Service for Neural Networks
- Delphi编译工程包含自己的dcu库报错could not compile used unit ‘XLDCU’
- Delphi编译过程中报错Incompatible types: ´ pwideChar ´ and ´ pansiChar ´,类型不匹配
- 增强Delphi的TStatusBar控件
- delphi十六进制字符串hex转byte数组
- Delphi Byte与数据类型之间的转换
- Delphi的(xor)转成java(xor),以及加密解密
- RadStudio 10.3.3 Rio (Delphi & C++ Builder)及TMS TAdvStringGrid控件安装方法
- delphi 判断点在多边形内
- Delphi中如何调用VC++创建的动态链接库
- delphi 给字符指针分配内存
- Delphi10.3的DBGrid美化(03)