Delphi 10 Seattle-具有VCL样式的Vista对话框错误 [英] Delphi 10 Seattle - Vista Dialogs bug with VCL Styles
问题描述
昨天我在"Delphi 10 Seattle"中遇到了"Vista Dialogs"问题.对于某些VCL样式,它似乎不能很好地工作. 在我的应用中使用"Windows 10 Dark"作为默认样式时,发生了此错误. 因此,我立即想到Vista对话框不适用于自定义VCL样式,但是当使用"Windows"作为默认样式并将Windows 10用作OS时,该对话框可以正常工作.
I've ran into a problem with "Vista Dialogs" in "Delphi 10 Seattle" yesterday. It seems to not work well with some VCL Styles. This bug occured while using "Windows 10 Dark" as default style in my app. So my immediate thought was that Vista Dialogs does not work with Custom VCL Styles, but when using "Windows" as a default style and using Windows 10 as OS the dialog works fine.
我已经上传了两张图片,其中一张的样式显示了视觉错误,另一张没有样式,可以正常工作.
I've uploaded two pictures, one with the style applied showing the visual bug and one without it, working just fine.
未应用"Windows 10 Dark" VCL样式
Without "Windows 10 Dark" VCL Style applied
应用"Windows 10 Dark" VCL样式
With "Windows 10 Dark" VCL Style applied
我对此进行了研究,其他帖子中也提到了此错误,但是此错误与这些帖子无关. 有人知道为什么会这样吗?以及我该如何解决?
I've researched about this, this error is mentioned in other posts, but this bug is not what those posts are about... Anybody understands why this happen? and how can I fix it?
推荐答案
RAD Studio中包含的VCL Styles
版本只能设置经典对话框的样式.如果要完全支持新建对话框",则必须使用 VCL Styles Utils
项目.
The VCL Styles
version included in RAD Studio only can style the classic dialogs, If you want full support for the New Dialogs you must use the VCL Styles Utils
project.
只需安装该库并将这些单元添加到您的项目中即可.
Just install the library and add these units to your project.
uses
Vcl.Styles.Utils.Menus, //Popup and Shell Menus (class #32768)
Vcl.Styles.Utils.Forms, //dialogs box (class #32770)
Vcl.Styles.Utils.StdCtrls, //buttons, static, and so on
Vcl.Styles.Utils.ComCtrls, //SysTreeView32, SysListView32
Vcl.Styles.Utils.ScreenTips, //tooltips_class32 class
Vcl.Styles.Utils.SysControls,
Vcl.Styles.Utils.SysStyleHook;
这篇关于Delphi 10 Seattle-具有VCL样式的Vista对话框错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!