110,534
社区成员
发帖
与我相关
我的任务
分享
string txt;
StringBuilder txt0 = new StringBuilder(richbox1.Text);
int i;
i = richbox1.SelectionStart;
txt = " " + "\n";
//richbox1.Text = richbox1.Text.Insert(i, txt);
txt0.Insert(i, txt);
richbox1.Text = txt0.ToString();
richbox1.SelectionStart = i + txt.Length - 1;
richbox1.ScrollToCaret();
richbox1.SelectionStart = i + txt.Length - 1000
richbox1.ScrollToCaret();
richbox1.SelectionStart = i + txt.Length - 1;