C# 如何讓TextBox的滾動條自動處於最下部_百度知道
https://zhidao.baidu.com/question/121281757.html
【滾動條自動處於TextBox最下部可以用兩行代碼實現】 注意:這兩種這兩種事件的區別,你自己操作一遍體驗一下,推薦使用第一種事件,既textBox1_MouseClick(),當單擊鼠標左鍵,滾動條自動處於TextBox最下部。另外還有一個容易出錯的地方,不要在窗體加載時使用,因爲窗體加載時還沒有這個控件,所以代碼將不會被執行! private void textBox1_MouseClick(object sender, MouseEventArgs e) { this.textBox1.SelectionStart = this.textBox1.Text.Length; this.textBox1.ScrollToCaret(); } private void textBox1_Click(object sender, EventArgs e) { //this.textBox1.SelectionStart = this.textBox1.Text.Length; //this.textBox1.ScrollToCaret(); }