I am developing a project using VB2010. In the attached example I created a Form.
On tha form I put a GroupBox Containing a DataGridView.
I am trying to set, at Design time, the ColumnHeadersDefaultCellstyle Font of the
grid, defining the Font, the size and the style (Bold). After saving the project or running
it, The Font properties of the grid headers are changed to the Font properties of the containing
Why is that so? How can I set, at Design Time, a different font for the Grid Column headers
and the GroupBox?
To demostrate the problm – Try to modify the Font of the grid headers, in the attached example,
to “Bold” “Size 12”, Run the application and see the result.
I did not see any attachment, but when I use the following line in a form, the font appears as I want: dataGridView1.Columns.HeaderCell.Style.Font = new Font(“Verdana”, 12f)
Hi LaviSl. While I agree with you that having the font automatically change to the parent container’s font is something that should be optional at design time, I had no problem changing the font at design time after that initial inheritance.