GPAを計算するためにWindowsアプリケーションを作成しようとしています。ユーザは被験者の数を入力することができ、アプリは被験者の数だけテキストボックスを作成する。しかし、私はテキストボックスから値を取得することはできません。これは私がdynamicllyからテキストを取得するtexbox
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < int.Parse(textBox1.Text); i++)
{
Label supjects = new Label();
supjects.Text = "supject " + (i+1) ;
supjects.Location = new System.Drawing.Point(60, 70+i*41);
supjects.Name = "supject" + i;
this.Controls.Add(supjects);
TextBox fullMark = new TextBox();
fullMark.Location = new System.Drawing.Point(162, 70 + i * 41);
fullMark.Size=new System.Drawing.Size(57, 24);
fullMark.Name = "fullMark" + i;
this.Controls.Add(fullMark);
TextBox yourMark = new TextBox();
yourMark.Location = new System.Drawing.Point(272, 70 + i * 41);
yourMark.Size = new System.Drawing.Size(57, 24);
yourMark.Name = "yourMark" + i;
this.Controls.Add(yourMark);
}
ありがとうございますが、私にそのコードを送信できますか? @ L.B –