NumericUpDown Control

The NumericUpDown control allows you to set a range of numbers that a user can browse and select. A range of numbers is presented in the control, and the user can click the up and down arrows to increase or decrease the number as necessary. Table 3-8 shows important properties of the NumericUpDown control.

Table 3-8 Important Properties of the NumericUpDown Control Property Description

Hexadecimal

Indicates whether the numeric value will be shown in hexadecimal.

Table 3-8 Important Properties of the NumericUpDown Control

Property

Description

Increment

Gets or sets the amount to increment or decrement with each button click.

Maximum

Indicates the maximum value for the control.

Minimum

Indicates the minimum value for the control.

ThousandsSeparator

Indicates whether the culture-appropriate thousands separator will be used when displaying values greater than 1,000.

Value

Gets or sets the current value of the control.

► To configure the NumericUpDown control

1. Set the Minimum property to the minimum numeric value for the control.

2. Set the Maximum property to the maximum numeric value for the control.

3. Set the Increment property to the amount you want to increment and decrement with each arrow button click.

4. If desired, set the Value property to a default value.

0 0

Post a comment