Alignment Settings in Windows Forms NumericUpDown (NumericUpDownExt)

This section discusses the Alignment settings of the NumericUpDownExt control.

Text alignment

The text of the NumericUpDownExt control can be aligned using the below given property.

NumericUpDownExt Property Description
TextAlign Gets / sets the alignment of the text in the spin box (also known as an up-down control).It includes the below given options:LeftRight andCenter.
this.numericUpDownExt1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
Me.numericUpDownExt1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

UpDownAlign

The alignment of the up and down buttons can be set using the property given below.

NumericUpDownExt Property Description
UpDownAlign Gets / sets the alignment of the up and down buttons. The default value is set to 'Right'.It includes the below given options.

Left and

Right.

this.numericUpDownExt1.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left;
Me.numericUpDownExt1.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left