Gast
#1311324
Hallo,
da ich noch nicht so tief im Thema stecke, hoffe ich, Ihr könnt mir
helfen:
Ich brauche ein paar Steuerelemnte, die sich alle gleichen und die nur
temporär erstellt werden sollen. Vom Prinzip so:
private void cmdGetD_Click(object sender, EventArgs e) {
System.Windows.Forms.TextBox textBox3;
System.Windows.Forms.TextBox textBox4;
textBox3 = new System.Windows.Forms.TextBox();
textBox4 = new System.Windows.Forms.TextBox();
this.panel1.Controls.Add(textBox3);
this.panel1.Controls.Add(textBox4);
textBox3.Font = new System.Drawing.Font("Microsoft Sans Serif",
7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((byte)(0)));
textBox3.Location = new System.Drawing.Point(36, 80);
textBox3.Name = "textBox3";
textBox3.Size = new System.Drawing.Size(90, 22);
textBox3.TabIndex = 0;
textBox4.Font = new System.Drawing.Font("Microsoft Sans Serif",
7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((byte)(0)));
textBox4.Location = new System.Drawing.Point(36, 110);
textBox4.Name = "textBox4";
textBox4.Size = new System.Drawing.Size(90, 22);
textBox4.TabIndex = 1;
}
Nun sollen das aber etwas mehr als 2 sein und deshalb hätte ich das
ganze gern als ein Array, damit ich die per for-loop oder so generieren
(und später auch ansprechen) kann.
Aber irgendwie krieg ich kein Steuerelemt-Array hin, krieg - egal, wie
ichs versuche - immer Fehlermeldungen.
Kann mir jemand sagen, wie das dann funktionierend aussehen muß?
Danke im Voraus!