Joshua
Joshua

Reputation: 175

RadioButtons Highlighting Incorrectly

On my form, I have 4 RadioButtons, each with its appearance set to Button. In my program, I change each of these RadioButton's ForeColour, BackColour and AutoCheck status, as below:

ARadioButton.AutoCheck = False
ARadioButton.BackColor = Color.FromKnownColor(KnownColor.ControlLightLight)
ARadioButton.ForeColor = Color.FromKnownColor(KnownColor.ControlDark)

However, later on, I reset these properties back to default:

ARadioButton.AutoCheck = True
ARadioButton.BackColor = DefaultBackColor
ARadioButton.ForeColor = DefaultForeColor

My issue is that instead of the entire button being highlighted, only the outside is, as shown in the images below.

Originally:

https://i.sstatic.net/lvd5x.png

After changes are made and RadioButtons reset to default using code above:

https://i.sstatic.net/JQ9hG.png

I know this may seem trivial, but I would like the entire RadioButton to be highlighted when the user clicks on the RadioButton, not just the outside.

Is there a way I could somehow reset this?

Upvotes: 1

Views: 40

Answers (1)

Charlie Stuart
Charlie Stuart

Reputation: 282

Try setting the BackColor property to Color.Transparent

Upvotes: 1

Related Questions