[英]have a prob.I already click the second textbox but it keeps appearing in both. I WANT THE NUMBER TO POP WHEN I CLICK ITS TEXTBOX. 1 at the time
MY CODE:我的代码:
namespace textbox { public partial class Form1 : Form { public Form1() { InitializeComponent();命名空间文本框 { 公共部分类 Form1 : Form { public Form1() { InitializeComponent(); }
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "2";
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = textBox2.Text += "1";
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
}
} }
In your button1_Click
method, the textBox1.Text
is attributed the result of concatenating "1" to textBox2.Text
.在您的
button1_Click
方法中, textBox1.Text
归因于将 "1" 连接到textBox2.Text
。 I think this is the cause of your problem.我认为这就是你的问题的原因。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.