C#控制RichTextBox滚动条的方法

private void button1_Click(object sender, EventArgs e)
        {
            int line = 11;//滚动到第10行
            int start = this.richTextBox1.GetFirstCharIndexFromLine(line);
            this.richTextBox1.SelectionStart = start;
            this.richTextBox1.ScrollToCaret();
        }



 

你可能感兴趣的:(object,C#,button)