How to control size of a radio button with appearance "Button"
Asked Answered
U

1

12

I thought I was good at WinForms stuff but apparently that's not the case.

This application is for touchscreen hardware. I want only one of buttons to stay pressed so I made them radio buttons with appearance Button. It's working well but I can't control their size such as width and height. The radio button size is controlled by its text and font size. If this is for common windows application, this is not a problem. But it is an issue since I am developing it for touchscreen.

How can I control size of the radio buttons?

Unreligious answered 10/4, 2012 at 14:15 Comment(0)
J
23

Set the AutoSize property of your RadioButton to false.

Jephum answered 10/4, 2012 at 14:18 Comment(2)
This allows the "clickable" area of buttons to be increased, but the size of the graphical portion (the circle with the dot in it) of the radio button appears unchanged.Pavel
Well, for this question it doesn't matter because radio is styled as a button (then there is no circle). In general to resize "clickable area" is the expected behavior (and the most sane one). Think about proportions and the final appearance (what should it do? Grow with text? Grow with boundaries?) nitro mention that the element is part of the window theme (it may then be a bitmap). Standard control covers 99% of use cases, for anything else...owner draw!Jephum

© 2022 - 2024 — McMap. All rights reserved.