Bonjour je souhaitais une reponse par rapport au post la :
http://www.csharpfr.com/infomsg_CREATION-TEXTBOX_377014.aspx
pour créer des textbox dynamiquement car je n'arrive a en faire qu'une seule :/
private
void FactureAjouter_Load(
object sender,
EventArgs e)
{
int xPos = 365;
const
int GAP = 10;
TextBox TextBox =
new
TextBox();
TextBox.Location =
new System.Drawing.
Point(xPos, 70);
xPos += 120 + GAP;
TextBox.Name =
"textBox1";
TextBox.Size =
new System.Drawing.
Size(200, 20);
TextBox.TabIndex = 1;
TextBox.Text =
"";
Controls.Add(TextBox);
}
private
void textBox1_TextChanged(
object sender,
EventArgs e)
{
int xPos = 365;
int yPos = 70;
const
int GAP = 10;
const
int GOP = 25;
TextBox TextBox =
new
TextBox();
extBox.Location =
new System.Drawing.
Point(xPos, yPos);
xPos += 120 + GAP;
yPos += 70 + GOP;
TextBox.Name =
"textBox1";
TextBox.Size =
new System.Drawing.
Size(200, 20);
TextBox.TabIndex = 1;
TextBox.Text =
"";
ontrols.Add(TextBox);
}
Merci.