TPanel color is black no matter what

无人久伴 提交于 2020-01-06 04:53:48

问题


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


回答1:


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.

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


Edit: 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.




回答2:


Make sure the panels do not have ParentColor=false and Color=clBlack assigned to them, and that ParentBackground=true is assigned.



来源:https://stackoverflow.com/questions/3233262/tpanel-color-is-black-no-matter-what

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