在按钮上单击显示文本框和命令按钮 [英] on button click show textbox and command button
本文介绍了在按钮上单击显示文本框和命令按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在命令按钮上单击显示文本框和命令按钮.
how can i make do on command button click show textbox and command button.
推荐答案
show =可见?
show = visible?
public Command_Click()
{
textbox1.visible = true;
command2.visible = true;
}
或者如果您将显示"表示为创建,那么
or if you mean ''show'' as create then
public Command_Click()
{
Textbox textbox1 = new Textbox();
textbox1.text = "My new textbox!!";
MyForm.Controls.Add(textbox1);
Button command2 = new Button();
command2.text = "newbutton!";
command2.Click += new System.EventHandler(command2_Click);
MyForm.Controls.Add(command2);
}
public command2_Click()
{
This code will run when you click button 2
}
这篇关于在按钮上单击显示文本框和命令按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文