menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class NumericTextBox - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class NumericTextBox

    Extends the NumberTextBoxBase class to handle numeric input and validation.

    Inheritance
    System.Object
    TextBoxExt
    NumberTextBoxBase
    NumericTextBox
    DoubleTextBox
    IntegerTextBox
    Implements
    IThemeProvider
    System.ComponentModel.ISupportInitialize
    System.Runtime.Serialization.ISerializable
    IVisualStyle
    Inherited Members
    NumberTextBoxBase.AllowNull
    NumberTextBoxBase.ApplyFormatting(String)
    NumberTextBoxBase.ApplyFormattingAndSetText(String)
    NumberTextBoxBase.ApplyRightToLeft()
    NumberTextBoxBase.BackColor
    NumberTextBoxBase.BackGroundColor
    NumberTextBoxBase.BindableValue
    NumberTextBoxBase.BindableValueChanged
    NumberTextBoxBase.CanInsert(String, String, Int32)
    NumberTextBoxBase.CanUndo
    NumberTextBoxBase.CheckDecimalPartLength(String)
    NumberTextBoxBase.CheckForMinMax(String)
    NumberTextBoxBase.CheckForMinMax(String, Boolean)
    NumberTextBoxBase.CheckIfNegative(String)
    NumberTextBoxBase.CheckIsZero()
    NumberTextBoxBase.CheckNullStringIsInRange(String)
    NumberTextBoxBase.ClipMode
    NumberTextBoxBase.ClipText
    NumberTextBoxBase.ClipTextChanged
    NumberTextBoxBase.CompleteInsertString(NumberModifyState)
    NumberTextBoxBase.CompleteSubtractKey(NumberModifyState)
    NumberTextBoxBase.ConcatModifiedText(String, String, String)
    NumberTextBoxBase.ControlValidated
    NumberTextBoxBase.Copy()
    NumberTextBoxBase.Culture
    NumberTextBoxBase.CurrentCultureRefresh
    NumberTextBoxBase.CursorShouldBeMoved(Int32, Boolean)
    NumberTextBoxBase.Cut()
    NumberTextBoxBase.DefaultValue
    NumberTextBoxBase.Delete()
    NumberTextBoxBase.DeleteSelectedText()
    NumberTextBoxBase.DeleteSelectedText(String, Int32, Int32)
    NumberTextBoxBase.Dispose(Boolean)
    NumberTextBoxBase.EndInit()
    NumberTextBoxBase.EnforceMinMaxDuringValidating
    NumberTextBoxBase.ForeColor
    NumberTextBoxBase.FormatChanged(String, NumberFormatInfo)
    NumberTextBoxBase.FormattedText
    NumberTextBoxBase.FormattedTextChanged
    NumberTextBoxBase.GetClipText()
    NumberTextBoxBase.GetClipText(Boolean)
    NumberTextBoxBase.GetCopyOfCurrentNumberFormatInfo()
    NumberTextBoxBase.GetDecimalDigits()
    NumberTextBoxBase.GetDecimalSeparator()
    NumberTextBoxBase.GetDecimalSeparator(NumberFormatInfo)
    NumberTextBoxBase.GetDecimalSeparatorPosition(String)
    NumberTextBoxBase.GetDecimalSeparatorPosition(String, NumberFormatInfo)
    NumberTextBoxBase.GetFirstDataPos()
    NumberTextBoxBase.GetGroupSeparator()
    NumberTextBoxBase.GetGroupSeparator(NumberFormatInfo)
    NumberTextBoxBase.GetInitialZeroCount(String, Int32)
    NumberTextBoxBase.GetNegativeInputPending()
    NumberTextBoxBase.GetNextDataPos(Int32, Boolean, Boolean, Boolean)
    NumberTextBoxBase.GetNumberPartLength(String)
    NumberTextBoxBase.GetNumberValue(String, Int32)
    NumberTextBoxBase.GetPreserveData()
    NumberTextBoxBase.GetPrevDataPos(Int32)
    NumberTextBoxBase.GetStartPositionJustNumbers(String, Int32)
    NumberTextBoxBase.GetTextBoxText()
    NumberTextBoxBase.GetTextBoxTextLength()
    NumberTextBoxBase.GetValue()
    NumberTextBoxBase.GetZeroNegative()
    NumberTextBoxBase.HandleBackspaceKeyChar()
    NumberTextBoxBase.HandleDecimalKey()
    NumberTextBoxBase.ignoreTextChange
    NumberTextBoxBase.InitializeNumberTextBox()
    NumberTextBoxBase.initNumberFormatInfoObject
    NumberTextBoxBase.InsertString(String, Int32, Int32, String)
    NumberTextBoxBase.InsertString(String, Int32, Int32, String, Boolean)
    NumberTextBoxBase.IsAssignable(Object)
    NumberTextBoxBase.IsDataPosition(String, Int32)
    NumberTextBoxBase.IsInDecimalPosition(String, Int32)
    NumberTextBoxBase.IsNegative
    NumberTextBoxBase.IsNull
    NumberTextBoxBase.IsValidCharacter(Char)
    NumberTextBoxBase.IsValidNumberValue(String)
    NumberTextBoxBase.KeyValidate
    NumberTextBoxBase.m_bDecimalMode
    NumberTextBoxBase.MaxLength
    NumberTextBoxBase.MinMaxValidation
    NumberTextBoxBase.NegativeColor
    NumberTextBoxBase.NegativeInputPendingOnSelectAll
    NumberTextBoxBase.NegativeSign
    NumberTextBoxBase.NullFormat
    NumberTextBoxBase.NullState
    NumberTextBoxBase.NullString
    NumberTextBoxBase.NumberFormatInfoObject
    NumberTextBoxBase.OnBackColorChanged(EventArgs)
    NumberTextBoxBase.OnBindableValueChanged(EventArgs)
    NumberTextBoxBase.OnClipTextChanged(EventArgs)
    NumberTextBoxBase.OnControlValidated(String, String)
    NumberTextBoxBase.OnEnter(EventArgs)
    NumberTextBoxBase.OnFormattedTextChanged(EventArgs)
    NumberTextBoxBase.OnKeyValidate(KeyValidateEventArgs)
    NumberTextBoxBase.OnMouseDown(MouseEventArgs)
    NumberTextBoxBase.OnReadOnlyChanged(EventArgs)
    NumberTextBoxBase.OnSetNull(SetNullEventArgs)
    NumberTextBoxBase.OnTextChanged(EventArgs)
    NumberTextBoxBase.OnValidating(CancelEventArgs)
    NumberTextBoxBase.OnValidationError(ValidationErrorArgs)
    NumberTextBoxBase.OnValidationFailed
    NumberTextBoxBase.OverWriteText
    NumberTextBoxBase.ParseForNegativeFormat(String)
    NumberTextBoxBase.ParseForNegativeFormat(String, NumberFormatInfo)
    NumberTextBoxBase.Paste()
    NumberTextBoxBase.PositionCursorAfterEdit(Int32, Boolean, Boolean, Boolean)
    NumberTextBoxBase.PositiveColor
    NumberTextBoxBase.PrepareInsertString(String, Int32, Int32, String, Boolean)
    NumberTextBoxBase.ProcessKeyEventArgs(Message)
    NumberTextBoxBase.ProcessKeyMessage(Message)
    NumberTextBoxBase.RaiseKeyValidate(Char, String, String)
    NumberTextBoxBase.RaiseSetNull(Object)
    NumberTextBoxBase.RaiseValidationError(String, Int32)
    NumberTextBoxBase.RaiseValidationError(String, Int32, String)
    NumberTextBoxBase.ReadOnlyBackColor
    NumberTextBoxBase.RefreshCulture()
    NumberTextBoxBase.RemoveFormatting(String)
    NumberTextBoxBase.RemoveFormatting(String, Boolean)
    NumberTextBoxBase.RemoveFormatting(String, NumberFormatInfo)
    NumberTextBoxBase.RemoveFormatting(String, NumberFormatInfo, Boolean)
    NumberTextBoxBase.ResetControlBackColor()
    NumberTextBoxBase.ResetForeColor()
    NumberTextBoxBase.ResetNegativeColor()
    NumberTextBoxBase.ResetPositiveColor()
    NumberTextBoxBase.ResetReadOnlyBackColor()
    NumberTextBoxBase.ResetRightToLeft()
    NumberTextBoxBase.ResetZeroColor()
    NumberTextBoxBase.ReturnBaseText
    NumberTextBoxBase.RightToLeft
    NumberTextBoxBase.rollBackOperation
    NumberTextBoxBase.SelectAll()
    NumberTextBoxBase.SelectAllOnFocus
    NumberTextBoxBase.SelectedText
    NumberTextBoxBase.SetControlColor()
    NumberTextBoxBase.SetDefaultValue(Object)
    NumberTextBoxBase.SetEmptySelection(Int32)
    NumberTextBoxBase.SetModifiedText(String, String)
    NumberTextBoxBase.SetNegativeInputPending(Boolean)
    NumberTextBoxBase.SetNull
    NumberTextBoxBase.SetNullNumberValue()
    NumberTextBoxBase.SetPreserveData(Boolean)
    NumberTextBoxBase.SetTextBoxText(String)
    NumberTextBoxBase.SetTextProperty(String)
    NumberTextBoxBase.SetValue(Object)
    NumberTextBoxBase.SetZeroNegative(Boolean)
    NumberTextBoxBase.ShouldSerializeNegativeColor()
    NumberTextBoxBase.ShouldSerializeNegativeSign()
    NumberTextBoxBase.ShouldSerializePositiveColor()
    NumberTextBoxBase.ShouldSerializeZeroColor()
    NumberTextBoxBase.SpecialCultureValue
    NumberTextBoxBase.supressKeyPress
    NumberTextBoxBase.ToggleNegative(String)
    NumberTextBoxBase.Undo()
    NumberTextBoxBase.UseNullString
    NumberTextBoxBase.UseUserOverride
    NumberTextBoxBase.Validate(Boolean)
    NumberTextBoxBase.ValidationError
    NumberTextBoxBase.WndProc(Message)
    NumberTextBoxBase.ZeroColor
    TextBoxExt.ApplyScaleToControl(Single)
    TextBoxExt.BeforeTouchSize
    TextBoxExt.BeginInit()
    TextBoxExt.Border3DStyle
    TextBoxExt.Border3DStyleChanged
    TextBoxExt.BorderColor
    TextBoxExt.BorderColorChanged
    TextBoxExt.BorderSides
    TextBoxExt.BorderSidesChanged
    TextBoxExt.CanApplyTheme
    TextBoxExt.CanOverrideStyle
    TextBoxExt.CharacterCasing
    TextBoxExt.CharacterCasingChanged
    TextBoxExt.ControlName
    TextBoxExt.CornerRadius
    TextBoxExt.CreateAccessibilityInstance()
    TextBoxExt.CreateParams
    TextBoxExt.DefWndProc(Message)
    TextBoxExt.DrawActiveWhenDisabled
    TextBoxExt.EnableTouchMode
    TextBoxExt.FarImage
    TextBoxExt.FocusBorderColor
    TextBoxExt.Font
    TextBoxExt.GetActiveThemeName()
    TextBoxExt.GetControlName(String)
    TextBoxExt.Initializing
    TextBoxExt.ISerializable.GetObjectData(SerializationInfo, StreamingContext)
    TextBoxExt.IsVisualStyleEnabled
    TextBoxExt.IThemeProvider.BaseThemeName
    TextBoxExt.IVisualStyle.VisualTheme
    TextBoxExt.MaximumSize
    TextBoxExt.MaximumSizeChanged
    TextBoxExt.Metrocolor
    TextBoxExt.MinimumSize
    TextBoxExt.MinimumSizeChanged
    TextBoxExt.NCOverflowIndicatorPaint(Graphics, Rectangle, Rectangle)
    TextBoxExt.NearImage
    TextBoxExt.Office2007ColorScheme
    TextBoxExt.Office2007ColorTable
    TextBoxExt.Office2010ColorScheme
    TextBoxExt.Office2010ColorTable
    TextBoxExt.OnBorder3DStyleChanged(EventArgs)
    TextBoxExt.OnBorderColorChanged(EventArgs)
    TextBoxExt.OnBorderSidesChanged(EventArgs)
    TextBoxExt.OnBorderStyleChanged(EventArgs)
    TextBoxExt.OnCanApplyThemeChanged(Boolean)
    TextBoxExt.OnCanOverrideStyleChanged(Boolean)
    TextBoxExt.OnCharacterCasingChanged(EventArgs)
    TextBoxExt.OnEnabledChanged(EventArgs)
    TextBoxExt.OnFontChanged(EventArgs)
    TextBoxExt.OnGotFocus(EventArgs)
    TextBoxExt.OnHandleCreated(EventArgs)
    TextBoxExt.OnHandleDestroyed(EventArgs)
    TextBoxExt.OnLostFocus(EventArgs)
    TextBoxExt.OnMaximumSizeChanged(EventArgs)
    TextBoxExt.OnMinimumSizeChanged(EventArgs)
    TextBoxExt.OnMouseEnter(EventArgs)
    TextBoxExt.OnMouseLeave(EventArgs)
    TextBoxExt.OnMultilineChanged(EventArgs)
    TextBoxExt.OnPaint(PaintEventArgs)
    TextBoxExt.OnParentChanged(EventArgs)
    TextBoxExt.OnSizeChanged(EventArgs)
    TextBoxExt.OnThemeNameChanged(String)
    TextBoxExt.OnThemesEnabledChanged(EventArgs)
    TextBoxExt.OverflowIndicatorToolTip
    TextBoxExt.OverflowIndicatorToolTipText
    TextBoxExt.RaiseThemeChanged(Object, ThemeChangedEventArgs)
    TextBoxExt.ShowOverflowIndicator
    TextBoxExt.ShowOverflowIndicatorToolTip
    TextBoxExt.Style
    TextBoxExt.ThemeName
    TextBoxExt.ThemeNameChanged
    TextBoxExt.ThemesEnabled
    TextBoxExt.ThemesEnabledChanged
    TextBoxExt.ThemeStyle
    TextBoxExt.UseBorderColorOnFocus
    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

    true if [delete selection on negative]; otherwise, false.

    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 property is True.

    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
    NumberTextBoxBase.HandleBackspaceKey()

    HandleCharacterKey(Char)

    Declaration
    protected override bool HandleCharacterKey(char charToBeInserted)
    Parameters
    Type Name Description
    System.Char charToBeInserted
    Returns
    Type
    System.Boolean
    Overrides
    NumberTextBoxBase.HandleCharacterKey(Char)

    HandleDeleteKey()

    Declaration
    protected override bool HandleDeleteKey()
    Returns
    Type
    System.Boolean
    Overrides
    NumberTextBoxBase.HandleDeleteKey()

    HandleSubtractKey()

    Declaration
    protected override NumberModifyState HandleSubtractKey()
    Returns
    Type
    NumberModifyState
    Overrides
    NumberTextBoxBase.HandleSubtractKey()

    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

    Implements

    IThemeProvider
    System.ComponentModel.ISupportInitialize
    System.Runtime.Serialization.ISerializable
    IVisualStyle
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved