0

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 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.