C# scrolling of richtextbox

2019-08-07 05:22发布

Is there a method to scroll the richtextbox to the top automatically with codes? Thanks!

3条回答
时光不老,我们不散
2楼-- · 2019-08-07 05:33
richTextBox.SelectionStart = richTextBox.Text.Length;
richTextBox.ScrollToCaret();

tRY the above 2 lines of code it worked for me!

查看更多
啃猪蹄的小仙女
3楼-- · 2019-08-07 05:37

you mean bottom?

instance.SelectionStart = instance.Text.Length;

or i guess top would be instance.SelectionStart = 0.

查看更多
smile是对你的礼貌
4楼-- · 2019-08-07 05:58
登录 后发表回答