Reputation:
I have a panel at top with the dock option 'Top' However events are not firing like;
private void pnlHeader_MouseClick(object sender, MouseEventArgs e)
{
MessageBox.Show("test");
}
All others panels are working good which they all are docked too.
What should be the cause?
Upvotes: 0
Views: 54
Reputation: 81
If your Panel contains other elements, and you're clicking on these elements, then the MouseClick event won't be fired (I just tested that). The solution is to whether put the same MouseClick event on the inner elements, or laying an invisible surface on the Panel in order to get the MouseClick event.
Upvotes: 1