textbox.Focus() after end of character

I am developing a smart device application.

Just added a button called "Loose". This button will display "Loose" character on the textbox, however the cursor is not on the textbox. So I added .Focus() function. But the cursor appear at the start of the textbox (before "Loose") instead at the end of the character "Loose".

Is there anyway that I can make the cursor to blink at the end of "Loose" character



Answer this question

textbox.Focus() after end of character

  • Ryan Schwartz

    This should do the trick:



    textBox1.Select(textBox1.Text.Length, 0)


  • Kyle Leitch

    Sorry, I wasn't aware of that.
  • polsksm

    From the documentation:

    You can programmatically move the caret within the text box by setting the SelectionStart to the position within the text box where you want the caret to move to and set the SelectionLength property to a value of zero (0). The text box must have focus in order for the caret to be moved.

    In your case use:

    textBox1.SelectionLength = 0;

    textBox1.SelectionStart = textBox1.TextLength;



  • mehran farshadmehr

    textbox.select() function is not available for smart device application.
  • BeaverMan

    Thanks Alex, it works.
  • textbox.Focus() after end of character