单击文本字段时,如何使文本消失? [英] how can i make a text disapear when I click on the text field ?
本文介绍了单击文本字段时,如何使文本消失?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以帮助我解决以下问题:
单击文本字段时如何使文本消失?
Can someone help me with thos problem:
how can i make a text disapear when I click on the text field ?
推荐答案
尝试一下:)
try this :)
textBox1.Click += new EventHandler(textBox1_Click);
private void textBox1_Click(object sender, EventArgs e)
{
textBox1.Text = string.Empty;
}
在您的文本框或Richtexbox或文本字段上,单击Event Write these:
On your textbox or Richtexbox or text field Click Event Write These :
string TEXT="Some Text BLA BLA";
private void richNote_Click(object sender, EventArgs e)
{
richNote.Text=TEXT;
}
这篇关于单击文本字段时,如何使文本消失?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文