C# textBox多行文本框自动滚动到最后一行

1.例子

        /// 
        /// textBox多行文本框,自动滚动到最后一行
        /// 
        /// 
        public void add_textbox_msg(string msg)
        {
            //容错处理
            if (string.IsNullOrEmpty(msg))
            {
                return;
            }
            textBox1.AppendText(msg);
            textBox1.AppendText("\r\n");//换行
            textBox1.ScrollToCaret();
        }

你可能感兴趣的:(C#,c#,开发语言)