0

I have a ToolStrip control docked to the top of a Windows Form. Throughout the program, I have the font sizes on controls not specified so that they inherit from the base form. That way I can set the font size larger when the user selects "Large Font Mode" and it automatically changes throughout. The ToolStrip seems completely unaffected by this and sticks to the default size.

Is there a way have the ToolStrip inherit the base font size? Or do I need to write something to go through and find all the ToolStrips and update their .Font property?

Picture for reference:

enter image description here


Little update - what led me down this road is that sales people got touch-capable 1080p 10" tablets running Win8. Before making any adjustments to the display settings, the ToolStrip was an impressive 3mm tall, very difficult for anyone with large hands to hit with any accuracy. The rest of the form was difficult to interact with too. Apple has suggested 7mm for touch targets, and even Microsoft suggests 9mm. Changing the settings in Control Panel > Display up to 160% resulted in touch targets of about 6.5mm, good enough to hit without making the rest of the form too big.

DavGarcia
  • 18,540
  • 14
  • 58
  • 96
  • See [Font Inheritance in Windows Forms](http://stackoverflow.com/a/6557160/719186) – LarsTech Apr 21 '14 at 23:25
  • What LarsTech is implying is that your application should *not* have a "Large Font Mode" because Windows already provides such a setting. – Cody Gray - on strike Apr 21 '14 at 23:55
  • Thanks for enlightening me Lars and Cody. I'm a web developer, so this kinds of things always boggle my mind when working on the occasional WinForms project. So for other running into this problem with ToolStrips, just tell your customers to go into Control Panel > Display then change the "size of items." That'll increase the size of everything. – DavGarcia Apr 22 '14 at 01:21
  • 1
    FYI, WinForms apps can be "DPI Aware" if they are built on .NET 4.7 or newer. See [High DPI support in Windows Forms](https://learn.microsoft.com/en-us/dotnet/framework/winforms/high-dpi-support-in-windows-forms). This will make their default appearance much more appropriate, on a high-dpi monitor. – ToolmakerSteve Apr 06 '18 at 20:54

0 Answers0