首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

简单有关问题,

2012-03-21 
简单问题,求助在线等!C# codeprivate void txtInvoice_Cash_TextChanged(object sender, EventArgs e) {if

简单问题,求助 在线等!

C# code
private void txtInvoice_Cash_TextChanged(object sender, EventArgs e) {       if (this.txtInvoice_Cash.Text.Length == 0)          {             this.txtInvoice_Cash.Text = "0.00";           }   //实现效果,当接收字符为.的时候,自动移动光标到文本框中最后一个点(.)后面的第一位0. }


[解决办法]
textBox1.SelectionStart = textBox1.Text.LastIndexOf(".");

热点排行