Hello,
when a NumericUpDown control has the focus,
the mousewheel increases/decreases its value.
How to turn off the mousewheel event ?
Thanks.
Hello,
when a NumericUpDown control has the focus,
the mousewheel increases/decreases its value.
How to turn off the mousewheel event ?
Thanks.
The third way works for me.
Thanks
You can. There are several ways:
1 – Add a javascript extender and add this script to the numericUpDown control:
this.removeListener('roll', this._onRoll);
2- When the control is created, or the container window page are created:
Eval("this.numericUpDown1.removeListener('roll', this.numericUpDown1,_onRoll)");
3- Create a MyNumericUpDown class like this:
public class MyNumericUpDown : NumericUpDown
{
public MyNumericUpDown()
{
this.ControlCreated += MyNumericUpDown_ControlCreated;
Application.ApplicationRefresh += Application_ApplicationRefresh;
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
Application.ApplicationRefresh -= Application_ApplicationRefresh;
}
private void MyNumericUpDown_ControlCreated(object sender, EventArgs e)
{
DisableRoll();
}
private void Application_ApplicationRefresh(object sender, EventArgs e)
{
DisableRoll();
}
private void DisableRoll()
{
Eval("this.removeListener('roll', this._onRoll, this)");
}
}
Please login first to submit.
