Delphi中的自定义背景颜色,启用了运行时主题

问题描述 投票:6回答:1

我在运行时创建了一堆Panel,我想改变它们的颜色。 Color属性不起作用,我不想转动运行时主题。

我正在使用Delphi XE3。

delphi colors themes vcl
1个回答
7
投票

从StyleElements中删除seClient并将ParentBackground设置为false。

aPanel.StyleElements :=  Panel1.StyleElements - [seClient];
aPanel.ParentBackground := False;
aPanel.Color := clLime;
© www.soinside.com 2019 - 2024. All rights reserved.