Sara forwarded me a customer question asking why radio button doesn’t resize when one changes the font on a Winform’s RadioButton control. Well, the simple answer is that is how underlying Windows control behaves and Winform’s control is just a wrapper on top of it. The next question is that I still want to have big radiobuttons. Well, “UI consistency cop” will say that even if you are able to change all the radiobuttons in your application to be big in size, you would still be inconsistent as your platform has small radiobuttons. However, if you still insist then you would have to

  • Inherit from RadioButton
  • You might have to set DoubleBuffer, AllPaintingInWmPaint and UserPaint ControlStyles to true to reduce the flicker.
  • Override OnPaint and Paint the radio button and text with bigger size. ControlPaint.DrawRadioButton should help you in drawing this. However you won’t get any help in drawing it themed until VS 2005 comes along. VS 2005 has renderers to help you with themed drawing. Until then, you are stuck with pinvoking UxTheme API.
  • I haven’t tried creating this control but I would think that you should able to get away without doing any custom hittesting (however, no guarantees; you are on your own).

These overridden, oversized controls (RadioButton, CheckBox etc.) are not hard to create. They do however create inconsistency and one should avoid going down that path.