Number Settings in Windows Forms Double TextBox

27 Apr 20213 minutes to read

The below table lists the properties which illustrates the number settings for the DoubleTextBox.

this.doubleTextBox1.NumberDecimalDigits = 3;
this.doubleTextBox1.NumberDecimalSeparator = "-";
this.doubleTextBox1.NumberGroupSeparator = ";";
this.doubleTextBox1.NumberGroupSizes = new int[] {4};
this.doubleTextBox1.NumberNegativePattern = 2;
Me.doubleTextBox1.AllowNull = True
Me.doubleTextBox1.NullString = ""
Me.doubleTextBox1.Text = ""
Me.doubleTextBox1.NumberDecimalDigits = 3
Me.doubleTextBox1.NumberDecimalSeparator = "-"
Me.doubleTextBox1.NumberGroupSeparator = ";"
Me.doubleTextBox1.CurrencyGroupSizes = New Integer() {3}
Me.doubleTextBox1.NumberNegativePattern = 2

DoubleTextBox Value

The maximum and minimum value of the editable field in DoubleTextBox control can be specified using the below properties.

this.doubleTextBox1.MaxValue = 25;
this.doubleTextBox1.MinValue = 4;
Me.doubleTextBox1.MaxValue = 25
Me.doubleTextBox1.MinValue = 4

We can set banner text for the DoubleTextBox control. Refer BannerTextProvider Component topic for more details.

We need to do the below settings to make Banner text feature available for the control.

this.doubleTextBox1.AllowNull = true;
this.doubleTextBox1.NullString = "";
this.doubleTextBox1.Text = "";
Me.doubleTextBox1.AllowNull = True
Me.doubleTextBox1.NullString = ""
Me.doubleTextBox1.Text = ""

Double textbox with banner text

Culture Setting

Users can set the culture of the double text box control using the Culture, CurrentCultureRefresh, SpecialCultureValue, and UseUserOverride properties.

this.doubleTextBox1.Culture = new System.Globalization.CultureInfo("ar-SA");
this.doubleTextBox1.CurrentCultureRefresh = true;
this. doubleTextBox1.SpecialCultureValue = Syncfusion.Windows.Forms.Tools.SpecialCultureValues.None;
this.doubleTextBox1.UseUserOverride = true;
Me.doubleTextBox1.Culture = New System.Globalization.CultureInfo("ar-SA")
Me.doubleTextBox1.CurrentCultureRefresh = True
Me.doubleTextBox1.SpecialCultureValue = Syncfusion.Windows.Forms.Tools.SpecialCultureValues.None
Me.doubleTextBox1.UseUserOverride = True

Double textbox culture