默认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;
默认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;