tags:

views:

9

answers:

1

hello, i am adding an text while i press enter in the rich text box after that the cursor is in the top of the string how to make it at the end of the string

 If e.KeyCode = Keys.Enter Then
            RichTextBox1.Text = RichTextBox1.Text + "enter"

        End If

can any one tell me how can i do that

A: 

Assuming that I understand your question correctly, I think you need to do:

RichTextBox1.SelectionStart = RichTextBox1.TextLength

If the text scrolls away, you might also need to do a:

RichTextBox1.ScrollToCaret()
ho1