I added a Panel inside a UserControl i design time.
Then, I added this control to a form.
I want to show a focus dashed border when the control has the focus.
Unfortunately, the Enter
event from the panel never fires. I only get a fire when I click on the user control itself.
To extend this question. How can I forward events from controls inside a user control to the base user control? A comment from Hans Passant in this question says that by default events are forwarded to their direct parent. I didn't change any of the control's properties. What am I doing wrong? Is there an obvious property I need to change on each control i order to force it to forward unhandled events?
I am using DevExpress
controls but this behavior is same in windows WinForms
controls.
edit: I understand that panel might not be able to get focus. If this is true, how do I forward each mouse event to the parent control?