Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom background color in Delphi with runtime themes enabled

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.

like image 732
David Novák Avatar asked Jun 06 '13 14:06

David Novák


1 Answers

Remove seClient from StyleElements and set ParentBackground to false.

aPanel.StyleElements :=  Panel1.StyleElements - [seClient];
aPanel.ParentBackground := False;
aPanel.Color := clLime;
like image 109
bummi Avatar answered Sep 28 '22 03:09

bummi