I have a button with AutoSize true. I dynamically set the text to a big word. Then the button AutoSize correctly, but then I set the text to a small word. In this case, the button still with the same size, so the button gets bigger than its text.
My solution to solve this was this:
button.AutoSize = false;
button.AutoSize = true;
This code sux! Is there a descent solution?
I also tried button.Refresh and button.Update.
Thanks
Set the
AutoSizeModetoGrowAndShrink(the default isGrowOnly).