简体   繁体   中英

Datagridview column header bigger C#

Im using WinForm. I have a datagridview with a couple columns. I want to know how to make the font of each column header bigger.

在此处输入图片说明

You can set the font on the header cell like:

dataGridView.Columns[0].HeaderCell.Style.Font = new Font(... etc

Or for all columns:

dataGridView.ColumnHeadersDefaultCellStyle.Font = new Font(... etc

但是,如果可以的话,我建议由设计人员执行此操作(如果在designer.cs中具有样式等,效果会更好)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM