如何在使用以下代码时使粗体字的粗体字为 dg.ForeColor = System.Drawing.Color.Black; 如何让它变成粗体?使用粗体字体设置Datagrid forecolor
感谢, POOJA
如何在使用以下代码时使粗体字的粗体字为 dg.ForeColor = System.Drawing.Color.Black; 如何让它变成粗体?使用粗体字体设置Datagrid forecolor
感谢, POOJA
喜欢的东西
dataGridView1.Font = new Font("Arial",8.5F , FontStyle.Bold);
您可以使用此代码(你也可以在t中找到它他designer.cs):
var dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle1;