How do I scroll a RichTextBox to the bottom?

Very Very Cherry picture Very Very Cherry · May 22, 2009 · Viewed 78.5k times · Source

I need to be able to scroll a RichTextBox to the bottom, even when I am not appending text. I know I can append text, and then use that to set the selection start. However I want to ensure it is at the bottom for visual reasons, so I am not adding any text.

Answer

Brandon picture Brandon · May 22, 2009

You could try setting the SelectionStart property to the length of the text and then call the ScrollToCaret method.

richTextBox.SelectionStart = richTextBox.Text.Length;
richTextBox.ScrollToCaret();