Online Barcode Generator
Positioning and Selection in Text Box C# Control
The Kettic Text Box WinForms Control provides the support of positioning and selection in Text Box Control in C# code, which can also be done by using keyboard and mouse input. If we use the keyboard and mouse, we can hold the shift key and then leave the mouse button or use one of the array keys to choose text in the Text Box. The following content shows how to position and select text by using C# code.
C# Code to Position and Select Text
There are two selection properties available to perform the selection in C# code to the Text Box Control, the SelectBeign and the SelectWidth. The SelectBeign property uses a number to indicate the insertion position in the string of the text. The number of 0 is the most positions of the insertion position. When a value given to the property is larger than the number of characters in the text box, the last character will be the insertion point. The SelectWidth property is used to adjust the insertion point width via assigning a value to it.
Another way of choosing the same text is to use the Select method,
If developers need to choose the complete text, they are able to utilize the ChooseComplete method in the ChosenText property to access the selected text.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI DesignWinForms UI Controls