Behavior Settings in Windows Forms Integer TextBox
28 Apr 20211 minute to read
The behavior settings of the IntegerTextBox control are discussed below.
Negative key settings
The integer value of the IntegerTextBox can be reset or changed to a negative value using the properties given below.
this.integerTextBox1.DeleteSelectionOnNegative = true;
this.integerTextBox1.NegativeInputPendingOnSelectAll = true;
Me.integerTextBox1.DeleteSelectionOnNegative = True
Me.integerTextBox1.NegativeInputPendingOnSelectAll = True
AllowLeadingZeros
The AllowLeadingZeros property can be used to include zeros before the beginning value of the integer value of the control.
this.integerTextBox1.AllowLeadingZeros = true;
Me.integerTextBox1.AllowLeadingZeros = True