C#实现textBox滚动条自动滚到最底端

1、配置textBox的Multiline属性为true;

2、配置textBox的ScrollBars属性为Vertical,实现纵向滚动条;

3、然后如下语句实现自己滚动:

  private void textBox_receive_area_TextChanged(object sender, EventArgs e)

  {

    textBox_receive_area.SelectionStart = textBox_receive_area.Text.Length;           

    textBox_receive_area.ScrollToCaret(); 

  }

posted @ 2011-06-16 12:37  Leo.Qiu  阅读(3467)  评论(3编辑  收藏  举报