C# Button carries information saved in a textbox
Textbox receive name and create button.
private void Adicionartxt_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
Button c = new Button();
c.Location = new Point(15, x);
c.Text = Adicionartxt.Text; //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);
Adicionartxt.Clear();
Adicionartxt.Visible = false;
x += 10 + c.Size.Height;
}
}
How do I get the button press information saved from a textbox?
Make array?
No comments:
Post a Comment