问题
Is there a method to scroll the richtextbox to the top automatically with codes? Thanks!
回答1:
you mean bottom?
instance.SelectionStart = instance.Text.Length;
or i guess top would be instance.SelectionStart = 0.
回答2:
Set .SelectionStart=0
and then .ScrollToCaret().
回答3:
richTextBox.SelectionStart = richTextBox.Text.Length;
richTextBox.ScrollToCaret();
tRY the above 2 lines of code it worked for me!
来源:https://stackoverflow.com/questions/4373433/c-sharp-scrolling-of-richtextbox