插入:(光标处插入)
string s = txtCode.Text;
idx = txtCode.SelectionStart;
s=s.Insert(idx, "T")
txtCode.Text = s;
txtCode.SelectionStart = idx+1;
txtCode.Focus();
回退:(光标处退格)
string s=txtCode.Text;
idx = txtCode.SelectionStart;
if (idx > 0)
{
txtCode.Text = s.Substring(0, idx - 1) + s.Substring(idx);
txtCode.SelectionStart = idx - 1;
}
else
{
txtCode.SelectionStart = 0;
| 
 | 
暂时没有评论
| 发表评论 - 不要忘了输入验证码哦! | 
 
				
 用户登陆
 站点日历
 站点统计
 最新评论
 textbox 插入   [ 日期:2018-03-12 ]   [ 来自: