C# textbox中光标定位到最后一行

使用如下语句即可

            this.textBoxLog.Focus();//获取焦点
            this.textBoxLog.Select(this.textBoxLog.TextLength,0);//光标定位到文本最后
            this.textBoxLog.ScrollToCaret();//滚动到光标处

猜你喜欢

转载自www.cnblogs.com/hking911218/p/8986934.html