dataGridView_EquipSelect.RowTemplate.Height = 40; //改变行的高度;
//改变标题的高度;
dataGridView_EquipSelect.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing;
dataGridView_EquipSelect.ColumnHeadersHeight = 50;
//设置标题内容居中显示;
dataGridView_EquipSelect.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dataGridView_EquipSelect.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
//自己设置标题内容;
dataGridView_EquipSelect.AutoGenerateColumns = false;
C#设置DataGridView控件的标题行的高度并且居中显示
最新推荐文章于 2024-08-28 19:53:24 发布