0
votes

I am developing a winform application. I need to add hovering color to the radio button. I couldn't find any event handler for the same.

I want to change the color of radio buttons when mouse hover over them.

Please let me know, how this can be achieved.

Thanks in advance !!

1

1 Answers

1
votes

try changing backColor properties.

for example, On Mouse Hover Event:

private void radioButton1_MouseHover(object sender, EventArgs e)
   {
      this.radioButton1.BackColor = System.Drawing.Color.Yellow; 
   }

when mouse hovering the background color of the radiobutton will change to yellow.

and On Mouse Leaving event:

private void radioButton1_MouseLeave(object sender, EventArgs e)
{
    this.radioButton1.BackColor = System.Drawing.Color.Empty;
}

the radio button background color will change back to default color.

than, you will get the hovering affect.

good luck.