change dbgrid fontstyle colors on delphi xe2


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

Request for Solution File

Ask an Expert for Answer!!
Case Study: change dbgrid fontstyle colors on delphi xe2
Reference No:- TGS0376780

Expected delivery within 24 Hours