- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
[译]RAD Studio 10.4 新变化:面向控件的 VCL 样式管理
一句话概括:可以同时选中多个样式,然后设置控件的 StyleName 属性来使用某个样式。
例如:
object Form2: TForm2
StyleName = 'Sky'
object Panel1: TPanel
StyleName = 'Light'
object Button1: TButton…
object Button3: TButton
StyleName = 'Sky'
end
end
object Button2: TButton
StyleName = 'Windows'
end
object Button4: TButton
StyleName = 'Luna'
end
object Button5: TButton
StyleName = 'Aqua Graphite'
end
end
其显示效果如下 :
基本规则:
StyleName 如果不是已支持的项目,则使用默认值。
使用 TStyleManager.DialogsStyleName 可以设置对话框样式
可以设置应用程序样式为 “Windows”。这意味着应用中 StyleName 为空时使用 Windows 默认样式。注意需要同时设置TStyleManager.UseSystemStyleAsDefault 的值为 true。
第三方控件不会自动使用样式,这个需要第三方控件支持
来源:http://blog.qdac.cc/?p=5254