设置numericupdown的属性不允许手动超过最大数量 [英] property to set numericupdown not allow to more than the maximum number manually

查看:595
本文介绍了设置numericupdown的属性不允许手动超过最大数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户手动输入时,设置numericupdown的属性不允许超过最大数量....这个Iam在keydown事件中处理但是每次用户输入任何值时都会触发此事件。所以有任何直接有必要处理这种情况。

what is the property to set numericupdown not allow to more than the maximum number when user types manually ....This Iam handling in the keydown event but this event fires every time user enters any value.so is there is any direct propery to handle this case.

推荐答案

基于范围的控件如 NumericUpDown 通常提供简单的属性,如最小和< b>最大(或类似名称)。

它们通常会限制输入值,无论涉及哪种编辑方法(用键盘输入或用鼠标点击)。



您使用 System.Windows.Forms.NumericUpDown 控件吗?



如果是,那么你可以看看以下MSDN页面:

NumericUpDown.Maximum Property



问候,

Daniele。
Range based controls like NumericUpDown usually provide simple properties like Minimum and Maximum (or similar names).
They usually constrain the input value regardless of the editing method involved (typing with keyboard or clicking with mouse).

Are you using System.Windows.Forms.NumericUpDown control?

if yes then you can look the following MSDN page:
NumericUpDown.Maximum Property

Regards,
Daniele.


这篇关于设置numericupdown的属性不允许手动超过最大数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆