- Clip mode
- Formatted text
- RightToLeft
- OverflowIndicatorToolTipText
Contact Support
Text Settings in Windows Forms Integer TextBox (Integertextbox)
4 Feb 20253 minutes to read
This section discusses the text settings of the IntegerTextBox control.
The text associated with the IntegerTextBox control can be set and customized using the below given settings.
this.integerTextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.integerTextBox1.SelectedText = "-12345678";
this.integerTextBox1.SelectAllOnFocus = true;
this.integerTextBox1.ClipText = "12";
Me.integerTextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.integerTextBox1.SelectedText = "-12345678"
Me.integerTextBox1.SelectAllOnFocus = true
Me.integerTextBox1.ClipText = "12"
The methods associated with the above properties are given below.
Clip mode
The formatting for the text can be enabled or disabled by using the ClipMode property.
this.integerTextBox1.ClipMode = Syncfusion.Windows.Forms.Tools.CurrencyClipModes.IncludeFormatting;
Me.integerTextBox1.ClipMode = Syncfusion.Windows.Forms.Tools.CurrencyClipModes.IncludeFormatting
Formatted text
Formatted text can be displayed using the FormattedText property.
this.integerTextBox1.FormattedText = "Hello";
Me.integerTextBox1.FormattedText = "Hello"
RightToLeft
The text can be displayed from right to left for RTL languages using the RightToLeft property.
NOTE
The RightToLeft property will be automatically set to ‘True’ for RTL languages.
this.integerTextBox1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
Me.integerTextBox1.RightToLeft = System.Windows.Forms.RightToLeft.Yes
NOTE
The ResetRightToLeft method can be used to reset the RightToLeft property to it’s default value.
OverflowIndicatorToolTipText
You can set the tooltip text using the below properties.
this.integerTextBox1.OverflowIndicatorToolTipText = "Overflow";
this.integerTextBox1.ShowOverflowIndicator = true;
this.integerTextBox1.ShowOverflowIndicatorToolTip = true;
Me.integerTextBox1.OverflowIndicatorToolTipText = "Overflow"
Me.integerTextBox1.ShowOverflowIndicator = True
Me.integerTextBox1.ShowOverflowIndicatorToolTip = True
A Sample which demonstrates the Text, Text Align and Overflow Indicator features of the IntegerTextBox control is available in the below sample installation path.
…\System Drive:\Users\Username\AppData\Local\Syncfusion\EssentialStudio\Version Number\Windows\Tools.Windows\Samples\Editor Controls\Editor Controls\CS