dbgrideh颜色问题(100分)

  • 主题发起人 主题发起人 qlong
  • 开始时间 开始时间
Q

qlong

Unregistered / Unconfirmed
GUEST, unregistred user!
把dbgrideh的FixedColor设置为黑色,表格线颜色设置为clMaroon,Flat设为True<br>表头的列间隔和行的间隔线有白色线和clMaroon,怎么把白色的去掉,左边的三角如何变成<br>其他的颜色呢
 
Options-&gt;dgColLines-&gt;false;dgRowLines-&gt;false<br>OptionsEh-&gt;dghFixed3D-&gt;false
 
Options-&gt;dgColLines-&gt;false;dgRowLines-&gt;false<br>OptionsEh-&gt;dghFixed3D-&gt;false &nbsp;<br><br>我的意思不是把线去掉,是把线的颜色变成clMaroon
 
dbgrideh 的 onDrawColumnCell 事件中键入以下代码:<br>&nbsp;//定义网格线的颜色: &nbsp; <br>&nbsp; dbgrideh1.DefaultDrawColumnCell(Rect,DataCol,Column,State); &nbsp; <br>&nbsp; with &nbsp; (Sender &nbsp; as &nbsp; Tdbgrideh ).Canvas &nbsp; do &nbsp; //画 &nbsp; cell &nbsp; 的边框 &nbsp; <br>&nbsp; begin &nbsp; <br>&nbsp; Pen.Color &nbsp; := &nbsp; $00ff0000; &nbsp; //定义画笔颜色(蓝色) &nbsp; <br>&nbsp; MoveTo(Rect.Left, &nbsp; Rect.Bottom); &nbsp; //画笔定位 &nbsp; <br>&nbsp; LineTo(Rect.Right, &nbsp; Rect.Bottom); &nbsp; //画蓝色的横线 &nbsp; <br>&nbsp; Pen.Color &nbsp; := &nbsp; $0000ff00; &nbsp; //定义画笔颜色(绿色) &nbsp; <br>&nbsp; MoveTo(Rect.Right, &nbsp; Rect.Top); &nbsp; //画笔定位 &nbsp; <br>&nbsp; LineTo(Rect.Right, &nbsp; Rect.Bottom); &nbsp; //画绿色的竖线 &nbsp; <br>&nbsp; end; &nbsp; <br>&nbsp; end;
 

Similar threads

D
回复
0
查看
846
DelphiTeacher的专栏
D
D
回复
0
查看
892
DelphiTeacher的专栏
D
D
回复
0
查看
834
DelphiTeacher的专栏
D
D
回复
0
查看
625
DelphiTeacher的专栏
D
D
回复
0
查看
812
DelphiTeacher的专栏
D
后退
顶部