Gridview的字体属性 [英] Font property of Gridview
本文介绍了Gridview的字体属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何更改Gridview窗体Windows窗体Application的Font属性.
How to change Font property of Gridview form Windows form Application.
推荐答案
请参阅此MSDN文章对其进行解释:
http://msdn.microsoft.com/en-us/library/z2akwyy7%28v = vs.80%29.aspx [ ^ ]
See this MSDN article which explains it:
http://msdn.microsoft.com/en-us/library/z2akwyy7%28v=vs.80%29.aspx[^]
只需使用DataGridView.Font属性 [的字体,请尝试以下操作:
Try this:
this.dataGridView1.DefaultCellStyle.Font = new Font("Tahoma", 15);
--Amit
--Amit
YourGridname.ColumnHeadersDefaultCellStyle.Font = new Font(YourGridname.Font, FontStyle.Bold); YourGridname.Columns[index].DefaultCellStyle.Font = new Font(YourGridname.DefaultCellStyle.Font, FontStyle.Italic);
您也可以通过以下链接对列,标题和单元格进行样式设置
http://msdn.microsoft.com/en-us/library/1yef90x0.aspx [ ^ ]
also you can style columns, headers and cells go through below link
http://msdn.microsoft.com/en-us/library/1yef90x0.aspx[^]
这篇关于Gridview的字体属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文