WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class NumericTextBox

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

    GetNumberStartPosition()

    Declaration
    protected virtual int GetNumberStartPosition()
    Returns
    Type Description
    System.Int32

    HandleBackspaceKey()

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

    HandleCharacterKey(Char)

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

    HandleDeleteKey()

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

    HandleSubtractKey()

    Declaration
    protected override NumberModifyState HandleSubtractKey()
    Returns
    Type Description
    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 Description
    System.Boolean

    ShouldSerializeNumberGroupSeparator()

    Indicates whether the NumberGroupSeparator should not be serialized if the UseLocaleDefault property is set.

    Declaration
    protected bool ShouldSerializeNumberGroupSeparator()
    Returns
    Type Description
    System.Boolean

    ShouldSerializeNumberGroupSizes()

    Indicates whether the NumberGroupPattern should not be serialized if the UseLocaleDefault property is set.

    Declaration
    protected bool ShouldSerializeNumberGroupSizes()
    Returns
    Type Description
    System.Boolean

    Implements

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