在C#里面 怎么表达比如 点击这个按钮 然后下边的文本框就出来自己想写的文字?怎么表达

谢谢大家帮忙解答 有详细代码更好

在窗体中设置两个控件分别是:button按钮和textBox文本框,将button按钮的值设为“点 它”,然后在按钮事件中写上以下代码就可以在文本框中显示你要想写的内容了!下面是我给你的例子:
if (this.button1.Text == "点 它")
{
this.textBox1.Text = "你好!";
this.button1.Text = "再 点";
}
else if (this.button1.Text == "再 点")
{
this.textBox1.Text = "我是×××!";
this.button1.Text = "继续点";
}
else if (this.button1.Text == "继续点")
{
this.textBox1.Text = "请问,你认识我吗?";
this.button1.Text = "再继续点";
}
else if (this.button1.Text == "再继续点")
{
this.textBox1.Text = "我们可以做朋友吗?";
this.button1.Text = "确 定";
}
else
{
return;
}

谢谢采纳!!
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-06-13
按钮点击事件--> 文本框 text.text="你想要的内容。",具体源码,好久没写C#,有点忘了什么格式的。这个在教材书中是基本的,你找下应该有。
第2个回答  2011-06-13
在button的点击事件中写 TextBox1.Text=“你想要出现的内容”;
相似回答