tags:

views:

241

answers:

2

Hi, I`ve got simple form with RichTextBox on it. In Load event I write some text to RichTextBox and now I want to set cursor location to the end of this text so I can add something. I've tried Focus() but it does't work

+1  A: 

You can either use the CaretPosition property or use the Select(pos, pos) method to achieve the desired result.

Edit:

The Focus method just moves the keyboard focus to your RichTextBox, but it doesn't alter the current position of the cursor inside the control.

Anax
A: 

Try :

 richTextBox1.SelectionStart = richTextBox1.Text.Length;
 richTextBox1.Focus();
CodeByMoonlight