天天看點

c# panel 添加滑鼠滾輪事件

屬性視窗裡是找不到的,但是可以手動添加代碼  this.splitContainer.Panel1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.OnMouseWheel); 僅僅這樣還不夠,你會發現滑鼠鍵盤還是不相應。 還需要在MouseDown事件裡添加如下代碼: this.splitContainer.Panel1.Focus(); 讓控件擷取焦點。

轉載于:https://www.cnblogs.com/cnicefire/archive/2010/07/24/1784133.html

c#