参考下面代码:
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if (Rect.Top = DBGrid1.CellRect(DBGrid1.Col,DBGrid1.Row).Top) and (not (gdFocused in State) or not DBGrid1.Focused) then
DBGrid1.Canvas.Brush.Color := clRed;//在这里写你想要的颜色
DBGrid1.DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
解决方案 »
- 关于self,弱弱的问一下,哪位大哥给讲解一下,self的用发
- 简单!!如何使用InstallShield为(Delphi+所涉及的文件夹)打包?
- 如何取得WebBrowser所打开的网页的源码?
- 求仿金山毒霸或金山词霸界面源码?
- 请问哪位用过RxRichEdit,教教我怎么用它来存储和显示图文数据???
- 寻求系统开发合作伙伴!!
- 请问:专业安装程序制作软件 InstallShield 的最新版是多少————在线等待!!!
- sql數據庫問題
- Form之间的调用问题
- 关于dbgrid中字段的问题,给分
- "selcet * from .db where x=y and a=b and…… "中,where后面可以跟几个and?
- 请大虾指点:存储过程处理速度问题!
它只是一种继承性的行为
调用默认的画格方法而已