Reputation: 103
I'm creating a bunch of Panels on runtime and I want to change their color. Color property doesn't work and I don't want turn of runtime themes.
I'm using Delphi XE3.
Upvotes: 9
Views: 2536
Reputation: 27367
Remove seClient from StyleElements and set ParentBackground to false.
aPanel.StyleElements := Panel1.StyleElements - [seClient];
aPanel.ParentBackground := False;
aPanel.Color := clLime;
Upvotes: 9