Changing color of column header in DBGrid with Theme settings on

1k Views Asked by At

Is it possible to change background color of Title in TDBGrid if i have some project appearance style, for example Iceberg Classico?

This code works fine when i turn off project appearance and change Grids drawing style to classic

 DBGrid1.DrawingStyle := gdsClassic;  
 DBGrid1.Columns[0].Title.Color := clRed;

Otherwise this is not working.

Can the color be changed without changing drawing style and appearance?

1

There are 1 best solutions below

0
Issam On

All you need to do is to change the DBGrid DrawingStyle properity to gdsGradient & then change the gradentEndColor & gradentStartColor to be the same color ..