The NumericUpDown control lets the user enter and edit numeric values. You can set the minimum and maximum values as well as the step change made when the spinner is used. The value of the control can also be set by commands from a connected device.

The NumericUpDown control is a Decimal value, even if you set the number of decimal places to zero.

Design-time Properties for the NumericUpDown control
ValueThe current value of control
MinimumSets the minimum value of the control
MaximumSets the maximum value of the control
IncrementThe amount to increment or decrement the value on each button click
HexadecimalIndicates whether the control should display its value in hexadecimal
DecimalPlacesThe number of decimal places to display
ThousandsSeparatorIndicates whether the system thousands separator (commonly ‘,’, ‘.’ or ‘ ‘) will be inserted between every three decimal digits
UpDownAlignSets whether the spinner is shown on the left or right side of the control
ReadOnlyIf true, the user can’t edit the control’s value
Run-time Properties for the NumericUpDown control
NameRead onlystringThe name of the control
ValueRead/writeDecimalThe current value
DoubleValueRead/writedoubleGets/sets the current control value as a Double. This can be more convenient for mathematical operations than the Decimal returned by the Value property
MinimumRead/writeDecimalGets/sets the minimum control value
MaximumRead/writeDecimalGets/sets the maximumcontrol value
Run-time properties common to most controls
VisibleRead/writeboolHide/show the control
EnabledRead/writeboolEnable/disable the control. When a control is disabled it is visible but shown grayed out and you can't interact with it.
ForeColorRead/writestringAdjust the foreground color
BackColorRead/writestringAdjust the background color
Recent Posts

Leave a Comment

Start typing and press Enter to search