Class NumericTextBox
Extends the NumberTextBoxBase class to handle numeric input and validation.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class NumericTextBox : NumberTextBoxBase, IThemeProvider, ISupportInitialize, ISerializable, IVisualStyle
Remarks
The NumericTextBox is not to be used directly.
Constructors
NumericTextBox()
Overloaded. Creates an object of type NumericTextBox.
Declaration
public NumericTextBox()
Remarks
The NumericTextBox object will be initialized with the default values for the display and data properties. You need to set any specific values.
Properties
DeleteSelectionOnNegative
Gets or sets a value indicating whether to delete selection when number is changed to negative.
Declaration
public bool DeleteSelectionOnNegative { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
NumberDecimalDigits
Gets or sets the maximum number of digits for the decimal portion of the number.
Declaration
public int NumberDecimalDigits { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
If the number requires two decimal points to accommodate the smallest
denomination and this property will have the value 2 in this case. If there
is a need to have a different value based on the locale, it will be
automatically changed if the
NumberDecimalSeparator
Gets or sets the decimal separator character that will be used for the display.
Declaration
public string NumberDecimalSeparator { get; set; }
Property Value
Type |
---|
System.String |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
NumberGroupSeparator
Gets or sets the separator to be used for grouping digits.
Declaration
public string NumberGroupSeparator { get; set; }
Property Value
Type |
---|
System.String |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
NumberGroupSizes
Gets or sets the grouping of NumberDigits in the NumberTextBox.
Declaration
public int[] NumberGroupSizes { get; set; }
Property Value
Type |
---|
System.Int32[] |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
NumberNegativePattern
Gets or sets the pattern to use when the value is negative.
Declaration
public int NumberNegativePattern { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
Methods
GetNumberEndPosition()
Declaration
protected virtual int GetNumberEndPosition()
Returns
Type |
---|
System.Int32 |
GetNumberStartPosition()
Declaration
protected virtual int GetNumberStartPosition()
Returns
Type |
---|
System.Int32 |
HandleBackspaceKey()
Declaration
protected override bool HandleBackspaceKey()
Returns
Type |
---|
System.Boolean |
Overrides
HandleCharacterKey(Char)
Declaration
protected override bool HandleCharacterKey(char charToBeInserted)
Parameters
Type | Name | Description |
---|---|---|
System.Char | charToBeInserted |
Returns
Type |
---|
System.Boolean |
Overrides
HandleDeleteKey()
Declaration
protected override bool HandleDeleteKey()
Returns
Type |
---|
System.Boolean |
Overrides
HandleSubtractKey()
Declaration
protected override NumberModifyState HandleSubtractKey()
Returns
Type |
---|
NumberModifyState |
Overrides
SetNumberFormatInfoInitValues()
Declaration
protected void SetNumberFormatInfoInitValues()
ShouldSerializeNumberDecimalSeparator()
Indicates whether the NumberDecimalSeparator should not be serialized if the UseLocaleDefault property is set.
Declaration
protected bool ShouldSerializeNumberDecimalSeparator()
Returns
Type |
---|
System.Boolean |
ShouldSerializeNumberGroupSeparator()
Indicates whether the NumberGroupSeparator should not be serialized if the UseLocaleDefault property is set.
Declaration
protected bool ShouldSerializeNumberGroupSeparator()
Returns
Type |
---|
System.Boolean |
ShouldSerializeNumberGroupSizes()
Indicates whether the NumberGroupPattern should not be serialized if the UseLocaleDefault property is set.
Declaration
protected bool ShouldSerializeNumberGroupSizes()
Returns
Type |
---|
System.Boolean |