I need to create a TextBox
that only accept numbers between 1
and 60
. My problem is the user can drag the selected text and move. This can create incorrect result.
Here is a gif that show the problem:
Can someone say a method which I can use to disable this functionality.
You say textbox, but even your gif shows a numeric up down. Using a numeric up down, you can set a max and min which will cap at max once it loses focus, such as clicking a button. Therefore, any functionality you want to use the numeric up down value for will update the value first, then run the rest of the program. If you want to completely prevent the drop all together, you can set AllowDrop to false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With