WinForms DataGridView font size

前端 未结 10 1858
半阙折子戏
半阙折子戏 2020-12-09 07:47

How do I change font size on the DataGridView?

10条回答
  •  隐瞒了意图╮
    2020-12-09 07:57

        private void UpdateFont()
        {
            //Change cell font
            foreach(DataGridViewColumn c in dgAssets.Columns)
            {
                c.DefaultCellStyle.Font = new Font("Arial", 8.5F, GraphicsUnit.Pixel);
            }
        }
    

提交回复
热议问题