- Back to Home »
- Windows Applications »
- NumericUpDown
Posted by :
Sudhir Chekuri
Monday, 15 February 2016
Displays a single numeric value that can be that the user can increment or decrement using up and down buttons on the control.
Default event: ValueChanged which is fired everytime when user changes the value.
Properties:
Increment: Indicates the amount to increment or decrement on each button click.
Minimum and Maximum: Indicates the minimum and maximum value for the numeric up-down control.
ThousandsSeparator: Set to true to add separator between every 3 digits.
Value: The current value of the numeric up-down control when it is loaded on the form.
Example code to display the selected value in label control:
Default event: ValueChanged which is fired everytime when user changes the value.
Properties:
Increment: Indicates the amount to increment or decrement on each button click.
Minimum and Maximum: Indicates the minimum and maximum value for the numeric up-down control.
ThousandsSeparator: Set to true to add separator between every 3 digits.
Value: The current value of the numeric up-down control when it is loaded on the form.
Example code to display the selected value in label control:
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
label1.Text = numericUpDown1.Value.ToString();
}