RM50Man
Messages postés314Date d'inscriptionmercredi 1 novembre 2000StatutMembreDernière intervention20 août 2006
-
20 juin 2005 à 22:52
cs_coq
Messages postés6349Date d'inscriptionsamedi 1 juin 2002StatutMembreDernière intervention 2 août 2014
-
24 juin 2005 à 20:21
Est ce qu il est possible de creer des composant a la volée dans une application windows, comme dans une application web..
Par exemple, un exemple debile, j entre le numero 2 ds une textbox , puis ca creer
2 boutons
// création des boutons
for ( int i = 0; i < nbButtons; i++ )
{
Button button = new Button();
button.Name = "runtimeButton" + i.ToString();
button.Width = 100;
button.Location = new Point(
button_CreerButtons.Location.X,
button_CreerButtons.Location.Y + (i+1)*button_CreerButtons.Height
);
button.Text = button.Name;
// ajout au form
this.Controls.Add(button);
}
}