c# panel 添加鼠标滚轮事件

属性窗口里是找不到的,但是可以手动添加代码 
this.splitContainer.Panel1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.OnMouseWheel);
仅仅这样还不够,你会发现鼠标键盘还是不相应。
还需要在MouseDown事件里添加如下代码:
this.splitContainer.Panel1.Focus();
让控件获取焦点。

posted @ 2010-07-24 08:26  icecryed  阅读(5324)  评论(0编辑  收藏  举报