如何使两个Editbox的内容同步 请问如何使在同一窗体内的两个Editbox内容同步,即修改了第一个,另一个也跟着改变。小弟初学,请各位帮帮忙啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void textBox1_TextChanged(object sender, System.EventArgs e){ this.textBox2.Text = this.textBox1.Text;} private void textBox2_TextChanged(object sender, System.EventArgs e){ this.textBox1.Text = this.textBox2.Text;} 别忘了private void InitializeComponent(){ this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);} 直接把其中的一个绑定到另一个上。把textbox1绑定到textbox2 上在textbox2的数据绑定属性中,选简单绑定,填入下面一行即可<%#this.textbox1.text%> textBox1_TextChanged事件 关于RGB转换的问题,谁能帮帮我 用c#做B/S和用JAVA做B/S哪个更有前途? 指定某个类编译成dll Math.Round()的 BUG :四舍六入五留双 跪求一个打印图片问题, 小小问题 邮件发送(MailMessage)使用过的,高手请进,问题解决倾囊相送(如方便请客感谢) 跪求:有关SECS/GEM 怎样让鼠标选中多条记录一块从datagrid中删除。winform 如何给菜单加入事件和处理函数? 类的数据库操作问题 怎么会有这么怪的问题~~~~~~~~
{
this.textBox2.Text = this.textBox1.Text;
}
{
this.textBox1.Text = this.textBox2.Text;
}
private void InitializeComponent()
{
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);}
在textbox2的数据绑定属性中,选简单绑定,填入下面一行即可
<%#this.textbox1.text%>
事件