Behavior Settings in Windows Forms NumericUpDown (NumericUpDownExt)

28 Apr 20211 minute to read

The behavior settings of the NumericUpDownExt control are discussed below.

Intercept arrow keys

The arrow keys can be used to select values using the below given property.

NumericUpDownExt Property Description
InterceptArrowKeys Gets / sets a value indicating whether the user can use the UP and DOWN ARROW keys to select values.
this.numericUpDownExt1.InterceptArrowKeys = true;                     
Me.numericUpDownExt1.InterceptArrowKeys = True

MaxLength

The maximum length of the text can be set using the property given below.

NumericUpDownExt Property Description
MaxLength Gets / sets the maximum length of the text that can be entered into the editable portion of the control. The default value is set to '32767'.
this.numericUpDownExt1.MaxLength = 32800;               
Me.numericUpDownExt1.MaxLength = 32800

ReadOnly

The ReadOnly mode can be enabled for the NumericUpDownExt control using the below given property.

NumericUpDownExt Property Description
ReadOnly Gets / sets a value indicating whether the text can be changed by the use of the up or down buttons only.
this.numericUpDownExt1.ReadOnly = true;
Me.numericUpDownExt1.ReadOnly = True