textControl1.Text.Insert(,)没效果?
比如想在文本框中插入一段字符串:textControl1.Text.Insert(10, "asdf");
为什么没效果呢?请版主帮忙~
回复 1# xiaoyaox044 的帖子
Insert()是string类型的方法,通过Text.Insert()暂时无法直接插入字符,如果需要进行插入字符操作,可以使用下面的代码:this.textControl1.Selection.Start = 10;
this.textControl1.Selection.Length = 0;
this.textControl1.Selection.Text = ","; OK,感谢斑竹 不客气 :)
页:
[1]