richtextbox 滚动条始终显示在最后一行

richtextbox的滚动条始终显示在最后一行,只要在textchanged事件中写下

            richtextbox.SelectionStart = richtextbox.TextLength;
            richtextbox.ScrollToCaret();   

这两行代码就可以了。

textbox 的滚动条始终显示在最后一行:

   this.textBox1.Focus();        

    this.textBox1.Select(this.textBox1.TextLength, 0);         
   this.textBox1.ScrollToCaret();


  

posted @ 2012-05-25 15:45  wenwen35  阅读(600)  评论(0编辑  收藏  举报