Change DBGrid FontStyle/ Colors on Delphi XE2+ Application
Project Description:
I want to Change DBGrid Colors/FontStyle on Delphi XE2+ application, so i want a code to do this, see my example code.
Req: Application has to be Style Enabled
Req: DBGrid DrawingStyle should be gdsThemed
Req: Must works on XE2+ version ( My example works only on old delphi, not on XE+ )
Req: Need change row color on gdSelected, gdFocused, gdRowSelected
Req: Full and working project code should be sent.
Proc... DrawColumnCell();
if [gdselected, gdRowSelected] in state then
Canvas.Brush.Color := somecolor;
case dataset.fieldbyname('somefeld').asInteger off
1: begin
Canvas.Font.Style := [fsbold];
Canvas.Font.Color := clRed;
end;
2: begin
Canvas.Font.Style := [];
Canvas.Font.Color := clBlue;
end;
end;
end;
Skills required: Software Development