Block the mouse scroll on MaskEditBox

4 posts, 0 answers
  1. Pat
    Pat avatar
    1 posts
    Member since:
    Oct 2011

    Posted 17 Feb 2012 Link to this post

    I'm using a MaskEditBox with a Numeric MaskType and Mask = c
    I have some event that I'm handling when people type in the control.
    I'm having an issue when the user scroll is mouse in the control, the value is changed and I don't want that to happen.
    Is there a way to block the Mouse scroll in the control? I don't want the value to change when the user scroll the mouse in the control.
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 21 Feb 2012 Link to this post

    Hi Pat,

    Thank you for writing.

    You can handle this case by setting the EnableMouseWheel to false. Please refer to the code below:

    radMaskedEditBox1.MaskedEditBoxElement.EnableMouseWheel = false;

    I hope this helps. Do not hesitate to contact us if you have other questions. Kind regards,
    Peter
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Tahir
    Tahir avatar
    2 posts
    Member since:
    Aug 2012

    Posted 31 Jul 2012 Link to this post

    I am facing the same problem but as per your suggested solution, I am unable to find EnableMouseWheel  property for MaskedEditboxElement. Can you please help? I am using Q2 2010.

    thanks in advance.
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 31 Jul 2012 Link to this post

    Hello Tadir,

    Thank you for writing.

    In Q2 2011 we had completely rewritten our RadDateTimePicker/RadMaskedEditBox controls in order to fix a few shortcomings and we have added the below mentioned property which allows you to disable the mouse-wheel functionality. However, in Q2 2010 such an option does not exists and I am not able to provide you with a replacement due to the internal implementation of the control in Q2 2010.

    I would like to suggest to upgrade to the latest version, where can access this property and take advantage of this functionality.

    Do not hesitate to contact us if you have other questions.

    All the best,
    Peter
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Back to Top