这里介绍一下FolderTreeView 类。
TFolderTreeView = class(TCustomFolderTreeView)
property OnChange: TNotifyEvent; read write;
property OnRename: TFolderRenameEvent; read write;
end;
而TCustomFolderTreeView又继承自TWinControl,所以和其他基本控件一样具有许多类似的属性,此处不再重复。
贴出代码段:
[code]贴出代码段:
var
myPage:TWizardPage;
ftv: TFolderTreeView;
procedure InitializeWizard();
begin
myPage:=CreateCustomPage(wpWelcome, '标题:自定义页面', '描述:这是我的自定义页面');
ftv := TFolderTreeView.Create(myPage);
ftv.Width := myPage.SurfaceWidth;
ftv.Height := myPage.SurfaceHeight;
ftv.Parent := myPage.Surface;
ftv.Directory := ExpandConstant('{win}');
end;
有必要对 ExpandConstant进行解释一下。该函数的原型为:
function ExpandConstant(const S: String): String;
描述为:Changes all constants in S to their values. For example, ExpandConstant('{srcexe}') is changed to the filename of Setup.An exception will be raised if there was an error expanding the constants.
即将字符串常量展开为所对于的路径字符串。常用的常量有{app}、{win}、{sys}、{src}、{dotnet20}等,避免了手动输入的麻烦。
运行效果如下:
有必要对 ExpandConstant进行解释一下。该函数的原型为:
function ExpandConstant(const S: String): String;
描述为:Changes all constants in S to their values. For example, ExpandConstant('{srcexe}') is changed to the filename of Setup.An exception will be raised if there was an error expanding the constants.
即将字符串常量展开为所对于的路径字符串。常用的常量有{app}、{win}、{sys}、{src}、{dotnet20}等,避免了手动输入的麻烦。
运行效果如下:
另外,该类支持一个OnChange的事件,当文件夹被修改时触发。
[code]
var
myPage:TWizardPage;
ftv: TFolderTreeView;
lbl: TLabel;
procedure ChangeDir(Sender: TObject);
begin
lbl.Caption:=ftv.Directory;
end;
procedure InitializeWizard();
begin
myPage:=CreateCustomPage(wpWelcome, '标题:自定义页面', '描述:这是我的自定义页面');
lbl:=TLabel.Create(myPage);
lbl.Parent:=myPage.Surface;
ftv := TFolderTreeView.Create(myPage);
ftv.Top:=lbl.Height+5;
ftv.Width := myPage.SurfaceWidth;
ftv.Height := myPage.SurfaceHeight-20;
ftv.Parent := myPage.Surface;
ftv.Directory := ExpandConstant('{win}');
ftv.OnChange:=@ChangeDir;
lbl.Caption:=ftv.Directory;
end;
这次运行的效果如下:
这次运行的效果如下:
可见标签的值和文件夹的值保持一致。
相关推荐
很好的安装程序打包软件innoSetup的入门教程。
Inno Setup是一个为Microsoft Windows应用程序创建安装程序的工具。innoextract允许在非Windows系统下提取此类安装程序,而无需使用wine运行实际的安装程序。innoextract 目前支持由 Inno Setup 1.2.10 到 6.2.1 ...
innosetup安装界面美化: 解压压缩包中的 Inno Setup 5.5.zip,运行Inno Setup 5.5\Inno Setup 5\Compil32.exe,右上角可以改变语言。 打开build.iss文件,一些自定义字段请按需修改,点击Inno Setup工具栏中的 ...
超详细系统讲解Inno安装包制作的全过程
使用inno setup将python exe制作安装包详细教程(csdn)————程序
Inno Setup 是一款免费的安装包制作软件,操作简单、功能稳定,能够快速制作出标准Windows风格的安装界面,足以完成一般安装任务。使用Inno Setup打包可执行的exe软件,可在任何电脑中运行。
Inno Setup支持以下函数和过程。 function InitializeSetup(): Boolean; 该函数在安装程序初始化时调用,返回False 将中断安装,True则继续安装,测试代码如下: function InitializeSetup(): Boolean; begin ...
Inno Setup 打包软件中文教程
可解加密的inno setup安装程序,可解加密的inno setup安装程序
InnoSetup 多安装目录
Inno setup是一款简便安装包工具,支持pascal脚本,几分钟就能生成标准Windows安装包。资源包括加密dll以及中文语言包
InnoSetup 获取本机IP地址的方法
inno setup 中文语言包,放在安装文件夹的languages文件夹下。 [Languages] Name: "chinese"; MessagesFile: "compiler:Languages\Chinese.isl
inno setup 入门学习的官方demo+网上案例+自己的案例
Inno Setup的安装程序也具有很高的兼容性,能够在Windows 95/98/Me/NT/2000/XP/Vista/7/8/10等Windows操作系统中运行。同时,它还支持多种安装方式,如标准安装、静默安装、自解压缩安装等。 除此之外,Inno Setup还...
自己替换app目录下的...注意:必须要用inno setup增强版封装,该资源包包含对.net FormWork 4 的封装。{code} 文件夹下的 Code.iss 是界面代码,version.h 是配置文件 可以在里面修改应用名称,公司 、版本号等信息。
innosetup安装界面美化、卸载界面美化资源文件包,附带psd文件,脚本文件;可灵活diy;注:图片的尺寸不可更改,更改的话iss文件也需要做处理!
inno setup中文帮助文档,PDF 版本,中文版 Inno Setup用Delphi写成,其官方网站同时也提供源程序免费下载。它虽不能与Installshield这类恐龙级的安装制作软件相比,但也当之无愧算是后起之秀。Inno Setup是一个免费的...
用inno setup进行打包安装的汉化文件,把 chinese.isl放到安装目录下的语言包里
Inno Setup 5.5.1 汉化增强版 安装制作