开发者

TPanel color is black no matter what

开发者 https://www.devze.com 2023-01-07 13:23 出处:网络
I just activated the themes in my W开发者_开发问答indows 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).

I just activated the themes in my W开发者_开发问答indows 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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号