tags:

views:

22

answers:

1

Hi,

Depending on the font settings (DPI and such) on the user's computers, I can have text become too big to fit in a button and moves down to the next line (wrap), so if it is a small button that says "Do xyz", it will only show "Do" unless I increase the height on the user's computer, but it looks fine on mine.

Is there any way to force it to stick to original font size?

+1  A: 

First of all: You shouldn't. The whole point of the user choosing how large their UI should be is that the UI will do exactly that.

You can, however, set the AutoScaleMode property on the form to None to prevent scaling. You can't set this directly on the button, though.

Depending how cramped your UI is you may want to consider simply setting the button's AutoSize property along with MinimumSize and MaximumSize to allow it to grow automatically if the text gets larger.

Joey
Aha, this is what I was looking for, thanks!
Dmi