Andy Webster

Andy Webster

  • 0
  • 117
  • 0

UserControl events - Not yet answered - Updated: Code added

Jul 3 2012 3:35 AM

I have created a user control that effectively is added to a form as a button group. The control has 3 contained buttons. What I want to do is have my user control raise MouseEnter and MouseLeave events for the entire control. I can get multiple events to fire as the mouse moves over the control from one contained button to the next but what I want is a single mouse enter event and a single mouse leave event for the usercontrol. My buttons completely fill the control container and have no spacing between them. I suppose what I am saying is how can I make the buttons contained in the control "transparent" to the mouse enter and mouse leave events thereby letting these events reach the usercontrol container.

Any ideas?


Updated: Code now attached

In the attached code I have just about managed to achieve my goal using a timer but it is not good code and there must be a better way of doing this

Answers (2)