I have a menu on my form that is defined as follows:
private System.Windows.Forms.MainMenu mainMenu1;
//Then
private void InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
this.Menu = this.mainMenu1;
}
I set the font for the entire form, but the Menu items still ignore it. How do I make the font bigger for the Menu items? I can’t find Font property for the Menu or MenuItem….
You can’t do it directly if you’re using a
MainMenu. You should be using aMenuStripinstead.If you absolutely must use
MainMenu, you have to set theOwnerDrawproperty of theMenuItemtotrueand override/implement theDrawItemandMeasureItemevents so that you can manually paint it.Here’s a very basic custom menu item class; it’s by no means complete or fully functional, but it should get you started:
Here’s a 3-deep test usage:
And the output: