默认DBGRID选中行的颜色为深蓝色,可以在程序中改变

在DBGRID的OnDrawColumnCell中写入

if (State=[gdSelectd..gdFocused,gdCurrent]) then

begin

   Grid.Canvas.Font.Color :=clRed;

   Grid.Canvas.Font.Brush.Color :=clInfor;

   Grid.DefaultDrawColumnCell(Rect,DataCol,Column,State);

end;

posted on 2012-01-05 17:39  del88  阅读(12)  评论(0编辑  收藏  举报