0

I'm trying to format ToolStripDropDownButton items

btn1.DropDown.ForeColor = Color.Gray; //this works
btn1.DropDown.Font.Bold = true; //this doesn't work.

Please, help.

Alegro
  • 7,534
  • 17
  • 53
  • 74

1 Answers1

2

The problem is that the properties inside the Font are read-only. The solution is to create a new font, like this:

btn1.DropDown.Font = new Font(btn1.DropDown.Font, FontStyle.Bold);
Tibi
  • 4,015
  • 8
  • 40
  • 64