Class IntegerTextBox
Inheritance
System.Object
IntegerTextBox
Implements
System.ComponentModel.ISupportInitialize
System.Runtime.Serialization.ISerializable
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class IntegerTextBox : NumericTextBox, IThemeProvider, ISupportInitialize, ISerializable, IVisualStyle
Constructors
IntegerTextBox()
Overloaded. Creates an object of type IntegerTextBox.
Declaration
Properties
AllowLeadingZeros
Indicates whether to allow insets zero in the beginning value.
Declaration
public bool AllowLeadingZeros { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
IntegerValue
Gets / sets the integer value of the control. This will be formatted and
displayed.
Declaration
public long IntegerValue { get; set; }
Property Value
Type |
Description |
System.Int64 |
|
IsNullValue
Declaration
[Obsolete("This property will not be used in future. Use NullState property to get the null state of the text box")]
public bool IsNullValue { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
MaxValue
Gets / sets the maximum value that can be set through the IntegerTextBox.
Declaration
public long MaxValue { get; set; }
Property Value
Type |
Description |
System.Int64 |
|
MinValue
Gets / sets the minimum value that can be set through the IntegerTextBox.
Declaration
public long MinValue { get; set; }
Property Value
Type |
Description |
System.Int64 |
|
NumberDecimalDigits
Gets / sets the maximum number of digits for the decimal portion.
Declaration
public int NumberDecimalDigits { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
NumberDecimalSeparator
Gets / sets the decimal separator character that will be used for the display.
Declaration
public string NumberDecimalSeparator { get; set; }
Property Value
Type |
Description |
System.String |
|
Text
Overrides the Text property of System.Windows.Forms.TextBox.
Declaration
public string Text { get; set; }
Property Value
Type |
Description |
System.String |
|
ThemeStyle
Declaration
public IntegerTextBoxVisualStyle ThemeStyle { get; set; }
Property Value
UseNullString
Declaration
[Obsolete("This property will not be used in future.")]
public bool UseNullString { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
ApplyFormatting(String)
Formats the given text according to the current setting.
Declaration
protected override string ApplyFormatting(string rawValue)
Parameters
Type |
Name |
Description |
System.String |
rawValue |
|
Returns
Type |
Description |
System.String |
|
Overrides
CheckForMinMax(String, Boolean)
Declaration
protected override bool CheckForMinMax(string currentTextValue, bool ignoreLength)
Parameters
Type |
Name |
Description |
System.String |
currentTextValue |
|
System.Boolean |
ignoreLength |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
CheckIfNegative(String)
Declaration
protected override bool CheckIfNegative(string rawValue)
Parameters
Type |
Name |
Description |
System.String |
rawValue |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
CheckIsZero()
Declaration
protected override bool CheckIsZero()
Returns
Type |
Description |
System.Boolean |
|
Overrides
CheckNullStringIsInRange(String)
Declaration
protected override bool CheckNullStringIsInRange(string nullString)
Parameters
Type |
Name |
Description |
System.String |
nullString |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
Type |
Description |
System.Windows.Forms.AccessibleObject |
|
Overrides
CursorShouldBeMoved(Int32, Boolean)
Declaration
protected override int CursorShouldBeMoved(int startPosition, bool inDecimalPosition)
Parameters
Type |
Name |
Description |
System.Int32 |
startPosition |
|
System.Boolean |
inDecimalPosition |
|
Returns
Type |
Description |
System.Int32 |
|
Overrides
Dispose(Boolean)
Releases the unmanaged resources used by the IntegerTextBox and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
true to release both managed and unmanaged resources; false to release only unmanage resources.
|
Overrides
FormatChanged(String, NumberFormatInfo)
Declaration
protected override void FormatChanged(string currentText, NumberFormatInfo previousFormat)
Parameters
Type |
Name |
Description |
System.String |
currentText |
|
System.Globalization.NumberFormatInfo |
previousFormat |
|
Overrides
GetControlName(String)
Helps to override the ThemeName property settings
Declaration
public override string GetControlName(string controlName)
Parameters
Type |
Name |
Description |
System.String |
controlName |
ThemeName
|
Returns
Type |
Description |
System.String |
|
Overrides
GetInitialZeroCount(String, Int32)
Declaration
protected override int GetInitialZeroCount(string currentText, int startPosition)
Parameters
Type |
Name |
Description |
System.String |
currentText |
|
System.Int32 |
startPosition |
|
Returns
Type |
Description |
System.Int32 |
|
Overrides
GetNumberPartLength(Int64)
Declaration
protected int GetNumberPartLength(long numberValue)
Parameters
Type |
Name |
Description |
System.Int64 |
numberValue |
|
Returns
Type |
Description |
System.Int32 |
|
GetNumberValue(String, Int32)
Declaration
protected override string GetNumberValue(string formattedText, int startPosition)
Parameters
Type |
Name |
Description |
System.String |
formattedText |
|
System.Int32 |
startPosition |
|
Returns
Type |
Description |
System.String |
|
Overrides
GetValue()
Declaration
protected override object GetValue()
Returns
Type |
Description |
System.Object |
|
Overrides
HandleBackspaceKey()
Declaration
protected override bool HandleBackspaceKey()
Returns
Type |
Description |
System.Boolean |
|
Overrides
HandleDecimalKey()
Declaration
protected override bool HandleDecimalKey()
Returns
Type |
Description |
System.Boolean |
|
Overrides
HandleDeleteKey()
Declaration
protected override bool HandleDeleteKey()
Returns
Type |
Description |
System.Boolean |
|
Overrides
InitializeNumberTextBox()
Declaration
protected override void InitializeNumberTextBox()
Overrides
InsertString(String, Int32, Int32, String, Boolean)
Declaration
protected override bool InsertString(string currentText, int startPosition, int selectionLength, string textToBeInserted, bool pasteOperation)
Parameters
Type |
Name |
Description |
System.String |
currentText |
|
System.Int32 |
startPosition |
|
System.Int32 |
selectionLength |
|
System.String |
textToBeInserted |
|
System.Boolean |
pasteOperation |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
IsAssignable(Object)
Declaration
protected override bool IsAssignable(object val)
Parameters
Type |
Name |
Description |
System.Object |
val |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
IsValidNumberValue(String)
Declaration
protected override bool IsValidNumberValue(string intString)
Parameters
Type |
Name |
Description |
System.String |
intString |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
OnEnabledChanged(EventArgs)
Raises the System.Windows.Forms.Control.EnabledChanged event.
Declaration
protected override void OnEnabledChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
An System.EventArgs that contains the event data.
|
Overrides
OnEnter(EventArgs)
Overrides the System.Windows.Forms.Control.OnEnter(System.EventArgs) method.
Declaration
protected override void OnEnter(EventArgs args)
Parameters
Type |
Name |
Description |
System.EventArgs |
args |
The event data.
|
Overrides
OnGotFocus(EventArgs)
Helps to override the OnGotFocus events
Declaration
protected override void OnGotFocus(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
An System.EventArgs that contains the event data.
|
Overrides
OnIntegerValueChanged(EventArgs)
Declaration
protected virtual void OnIntegerValueChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
A System.EventArgs that contains the event data.
|
OnTextChanged(EventArgs)
Declaration
protected override void OnTextChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
The event data.
|
Overrides
OnThemeNameChanged(String)
Helps to apply the ThemeName settings in control
Declaration
public override void OnThemeNameChanged(string themeName)
Parameters
Type |
Name |
Description |
System.String |
themeName |
ThemeName
|
Overrides
OnValidated(EventArgs)
Declaration
protected override void OnValidated(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
OnValidating(CancelEventArgs)
Declaration
protected override void OnValidating(CancelEventArgs e)
Parameters
Type |
Name |
Description |
System.ComponentModel.CancelEventArgs |
e |
|
Overrides
PerformMinMaxValidation()
performs the Min/Max validation.
Declaration
protected virtual void PerformMinMaxValidation()
PrepareInsertString(String, Int32, Int32, String, Boolean)
Declaration
protected override NumberModifyState PrepareInsertString(string currentText, int startPosition, int selectionLength, string textToBeInserted, bool pasteOperation)
Parameters
Type |
Name |
Description |
System.String |
currentText |
|
System.Int32 |
startPosition |
|
System.Int32 |
selectionLength |
|
System.String |
textToBeInserted |
|
System.Boolean |
pasteOperation |
|
Returns
Overrides
ResetText()
Declaration
public override void ResetText()
SetIntegerValue(Int64)
Declaration
protected void SetIntegerValue(long newValue)
Parameters
Type |
Name |
Description |
System.Int64 |
newValue |
|
SetNullNumberValue()
Declaration
protected override void SetNullNumberValue()
Overrides
SetTextProperty(String)
Declaration
protected override void SetTextProperty(string newText)
Parameters
Type |
Name |
Description |
System.String |
newText |
|
Overrides
SetValue(Object)
Declaration
protected override void SetValue(object val)
Parameters
Type |
Name |
Description |
System.Object |
val |
|
Overrides
ShouldSerializeNumberDecimalDigits()
Declaration
public bool ShouldSerializeNumberDecimalDigits()
Returns
Type |
Description |
System.Boolean |
|
ShouldSerializeNumberDecimalSeparator()
Declaration
public bool ShouldSerializeNumberDecimalSeparator()
Returns
Type |
Description |
System.Boolean |
|
ShouldSerializeText()
Indicates whether to serialize the Text property
if it is null or quals NullString
Declaration
protected bool ShouldSerializeText()
Returns
Type |
Description |
System.Boolean |
|
ToggleNegative(String)
Declaration
protected override string ToggleNegative(string currentText)
Parameters
Type |
Name |
Description |
System.String |
currentText |
|
Returns
Type |
Description |
System.String |
|
Overrides
Events
IntegerValueChanged
Declaration
public event EventHandler IntegerValueChanged
Event Type
Type |
Description |
System.EventHandler |
|
Implements
System.ComponentModel.ISupportInitialize
System.Runtime.Serialization.ISerializable