我有一个垂直面板,它有一个按钮,该按钮必须显示一个文本框,该文本框将插入名称并在面板内创建一个按钮
我不知道如何显示文本框和一个按钮以在其上创建一个按钮 = /
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Visible)
textBox1.Visible = false;
else
textBox1.Visible = true;
Button c = new Button();
c.Location = new Point(15, x);
c.Text = "novo"; //here comes with the button name, need textbox receives the name and create a button with the name of the textbox.
panel1.Controls.Add(c);
x += 10 + c.Size.Height;
}