[トピック内 5 記事 (1 - 5 表示)] << 0 >>
// ------- 一例 ------- private void button1_Click(object sender, EventArgs e) { for (int i = 0; i < 5; i++) { RadioButton radio = new RadioButton(); radio.Text = i.ToString(); radio.Tag = i; radio.Location = new Point(10, 10 + i * 30); radio.Click += radio_Click; Controls.Add(radio); } } private void radio_Click(object sender, EventArgs e) { textBox1.Text = string.Format("{0}を選んだね", ((RadioButton)sender).Tag.ToString()); } }
管理者用
- Child Tree -