Winform-TextBox滑动条保持在最后一行

TextBox滑动条保持在最后一行

private void TextBox_TextChanged(object sender, System.EventArgs e)  
{  
    this.TextBox.SelectionStart = this.TextBox.Text.Length;  
    this.TextBox.SelectionLength = 0;  
    this.TextBox.ScrollToCaret();  
}  

 

posted @ 2023-03-11 16:51  ꧁执笔小白꧂  阅读(160)  评论(0)    收藏  举报