关于DateGridView的颜色

来源:百度知道 编辑:UC知道 时间:2024/06/23 20:37:53
1.如何调整下图框1的大小(我想让他变窄)
2.如何改变框2 字段名这栏的颜色

要求比较特殊,请高人作答!

属性里面有的 你找找就找到了

属性里面没有.
只有自己画.
在dataGridView1_CellPainting事件里面用Graphics画出来
e.Graphics.DrawString(e.Value.ToString(),new Font("楷书",11),new SolidBrush(Color.Red),e.CellBounds,new StringFormat(StringFormatFlags.DisplayFormatControl));

我找了下有篇文章你正好可以用到