TPanel颜色为黑色,无论如何 [英] TPanel color is black no matter what

查看:92
本文介绍了TPanel颜色为黑色,无论如何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在Windows XP中激活了主题(通常我使用的是经典的Win9x外观),并且看到两个面板是纯黑色的。其他面板也可以(颜色= clBtnFace)。
这两个面板的共同点是其父面板。两者都直接放置在TForm上。如果我将它们移到其他父级(例如另一个面板),则它们具有适当的颜色。

I just activated the themes in my Windows XP (usually I work using the classic Win9x look) and I have seen that two panels are pure black. Other panels are ok (color = clBtnFace). What these 2 panels have in common is their parent. Both are placed directly on a TForm. If I move them to a different parent (another panel for example) the have the appropriate color.

Delphi 7,win xp pro

Delphi 7, win xp pro

推荐答案

这是另一个宏伟的概念德尔福错误。我开始从项目中删除内容并重新编译该项目。一个小时后,我终于进入了主表格。我删除了XPManifest控件,现在,该程序可以正常运行了。

This is another grandiose Delphi bug. I started do delete stuff from my project and recompile the project. After one hour I finally went to the main form. I deleted the XPManifest control and now, magically, the program works.

此处讨论了新发行版(XPMan):将XPManifest控件放在窗体上时,TPanel颜色为黑色

The new issue (XPMan) is discussed here: TPanel color is black when I drop a XPManifest control on my form

编辑:
删除XPMan是不够的。您还必须删除RES文件。对于大型应用程序,可能需要一段时间才能手动重建该文件。也许它可以放大该文件并手动删除XPMan添加的资源。

Removing the XPMan is not enough. You will have to delete also the RES files. For large applications it may take a while to manually reconstruct that file. Maybe it works to big into that file and manually remove the resources added by XPMan.

这篇关于TPanel颜色为黑色,无论如何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆