怎么让textbox 一运行就显示最底下的文本,滚动条也在对最底下。
this.textBox1.SelectionStart = this.textBox1.TextLength;
this.textBox1.ScrollToCaret();
这样写了还是不行,是不是我写错位置了?我写在窗体的load事件里面..大侠帮帮忙。

解决方案 »

  1.   


            private void Form1_Shown(object sender, EventArgs e)
            {
                this.textBox1.SelectionStart = this.textBox1.TextLength;
                this.textBox1.ScrollToCaret();
            }
      

  2.   


      private void ChanageTextBox(TextBox tb)
            {
                tb.SelectionStart = tb.Text.Length;
                tb.SelectionLength = 0;
                tb.ScrollToCaret();
            }
      

  3.   

    this.textBox1.Select(this.textBox1.TextLength-1,0);
    this.textBox1.ScrollToCaret();
    这样呢?