Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resizing Control Added At Runtime
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01390138
Message ID:
01390168
Vues:
47
>I am adding a usercontrol to a form at runtime. If the control is on the form, and the form is resized, how do I resize the control? I'm not sure how to check to see of the control is on the form and how to get a reference to it.
>
>Thanks

You can use anchor something like this
this.textBox = new TextBox();
this.textBox.Location = new Point(100, 100);
this.textBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.Controls.Add(this.textBox);
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform