We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Is there the possibility to set the caret input position of IntegerTextBox control?

Hi,

I'd like to set the caret input position of an IntegerTextBox to the end of the current text, but I'm not able to figure out how to do it.
For example, for WPF TextBox there is the "CaretIndex" property that I can't find on this control.
Is there any possibility?

1 Reply

NK Niranjan Kumar Gopalan Syncfusion Team December 5, 2019 06:25 AM

Hi Silvio, 
 
Thanks for contacting syncfusion support. 
 
We have analyzed your query regarding “Set the caret input position of an IntegerTextBox to the end of the current text” and you can use SelectionStart  property to set the caret position at the end of current text and change the value of TextSelectionOnFocus property to false. But the entire text selection when focus is set to IntegerTextBox won’t work.  Please refer the code snippet below. 
 
C#: 
public MainWindow() 
        { 
            InitializeComponent(); 
            integertextbox.TextSelectionOnFocus = false; 
            integertextbox.GotFocus += Integertextbox_GotFocus; 
        } 
        private void Integertextbox_GotFocus(object sender, RoutedEventArgs e) 
        { 
            integertextbox.SelectionStart = integertextbox.Text.Length; 
        } 
 
 
Regards, 
Niranjan Kumar 
 


Loader.
Live Chat Icon For mobile
Up arrow icon