看看 Delphi XE2 为 VCL 提供的 14 种样式
来源:互联网 发布:移动宽带没有网络 编辑:程序博客网 时间:2024/06/05 10:12
http://www.cnblogs.com/del/archive/2011/11/09/2243556.html
其实只提供了 13 个 vsf 样式文件, 还有默认的 Windows 样式, 共 14 种.
在空白窗体上添加 ListBox1 等控件, 测试代码:
uses IOUtils, Vcl.Styles, vcl.Themes;procedure TForm1.FormCreate(Sender: TObject);var dir, fileName, styleName: string;begin //VCL 的样式文件 *.vsf 在 X:\Program Files\Embarcadero\RAD Studio\9.0\Redist\styles\vcl\ dir := GetEnvironmentVariable('Delphi') + '\Redist\styles\vcl'; {载入所有 *.vsf 文件} for fileName in TDirectory.GetFiles(dir, '*.vsf') do TStyleManager.LoadFromFile(fileName); {将样式名称导入列表} for styleName in TStyleManager.StyleNames do ListBox1.Items.Add(styleName);end;{修改样式}procedure TForm1.ListBox1Click(Sender: TObject);begin TStyleManager.SetStyle(ListBox1.Items[ListBox1.ItemIndex]);end;
效果图:
http://stackoverflow.com/questions/9906312/delphi-xe2-vcl-styles-tutorial-how-to-change-the-style-at-runtime
http://docwiki.embarcadero.com/Libraries/XE4/en/Vcl.Themes
- 看看 Delphi XE2 为 VCL 提供的 14 种样式
- 看看 Delphi XE2 为 VCL 提供的 14 种样式
- Delphi XE2 为 VCL 提供的 14 种样式
- Delphi XE2 的皮肤
- delphi xe2的LibraryPath
- 如何使用XE2及更高版本中提供的自定义皮肤(样式)功能
- delphi对窗体的查询(delphi xe2)
- Delphi XE2
- Delphi XE2 之 FireMonkey 入门(20) - TStyleBook(皮肤、样式相关)
- delphi XE2自带的皮肤控件
- CodeSite 的使用方法 for Delphi XE2
- Delphi XE2下的MapX异常
- Delphi7到Delphi XE2的升级历程
- 恢复Delphi XE2的Library Path
- delphi vcl图像的二值化
- Delphi XE2 发布了
- DELPHI XE2马上推出
- Delphi XE2 Update4
- IE8 Automation 服务器不能创建对象 解决方法
- python 内存泄漏及gc模块的使用
- 《openssl 编程》之 RSA
- android 用json格式post数据
- read_proc的用法实例
- 看看 Delphi XE2 为 VCL 提供的 14 种样式
- OpenRisc-35-基于orpsoc,eCos的sd card controller的测试实验
- OpenSSL应用之公钥算法RSA
- windows下mysql root密码丢失怎么办?如何修改root密码
- Flatten Binary Tree to Linked List
- Surfaceflinger 一点解释
- 重载和重写的区别
- 微信:一个必须研究的产品
- SLF4J 简单日志门面 介绍和使用