Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hello,

I created a new C# Windows Application in Visual Studio 2008, and added a Panel (from the Toolbox) to the Form.
But, I don't see the MouseWheel event of the Panel.

Panel derives from Control, which does has the MouseWheel event.
So why Panel does not have the MouseWheel event ?

Thanks !
Posted

That is because Panel is used as a container and it does not gets focussed. Only the controls inside it get focus. So, if you have a Panel in a form and do a MouseWheel on panel, form's event will be fired and not the Panels.

In case any of the control inside panel has focus, it's mouse wheel event will be fired.
 
Share this answer
 
I understand !
Thank you for the great answer !
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900