DataGridView的WinForms的字体大小 [英] WinForms DataGridView font size
本文介绍了DataGridView的WinForms的字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何改变DataGridView的字体大小?
解决方案
私人无效UpdateFont ()
{
//改变细胞字体
的foreach(的DataGridViewColumn℃的dgAssets.Columns)
{
c.DefaultCellStyle.Font =新的字体(宋体 ,8.5F,GraphicsUnit.Pixel);
}
}
How do I change font size on the DataGridView?
解决方案
private void UpdateFont()
{
//Change cell font
foreach(DataGridViewColumn c in dgAssets.Columns)
{
c.DefaultCellStyle.Font = new Font("Arial", 8.5F, GraphicsUnit.Pixel);
}
}
这篇关于DataGridView的WinForms的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文