Reputation: 165
Is there a method to scroll the richtextbox to the top automatically with codes? Thanks!
Upvotes: 1
Views: 3099
Reputation: 1039
richTextBox.SelectionStart = richTextBox.Text.Length;
richTextBox.ScrollToCaret();
tRY the above 2 lines of code it worked for me!
Upvotes: 0
Reputation: 2524
you mean bottom?
instance.SelectionStart = instance.Text.Length;
or i guess top would be instance.SelectionStart = 0.
Upvotes: 2