Situation: I need a tiny button, with some text on it.
Problem: The button seems to think displaying empty space near its edges is more important than displaying my Text.
I can't for the life of me figure out how to remove that blank stuff at the edges. Any help is greatly appreciated!
Thanks in advance.
-MonsterMaw
Assuming you're talking about WinForms, you can set the FlatStyle
property of the button to System
.
That will let you resize the button so that it is small enough for the text to fit exacty, without any internal padding.
You could override the OnPaint method on the button and then draw it however you like. I think you could use the base.OnPaint to draw the button without any text and then draw the text on yourself with pevent.Graphics.DrawString?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With