Delphi 10 Seattle - Vista Dialogs bug with VCL Styles

这一生的挚爱 提交于 2019-12-10 11:26:11

问题


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.

Without "Windows 10 Dark" VCL Style applied

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?


回答1:


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;



来源:https://stackoverflow.com/questions/39038750/delphi-10-seattle-vista-dialogs-bug-with-vcl-styles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!