- 最後登錄
- 2024-4-26
- 在線時間
- 87 小時
- 註冊時間
- 2007-1-27
- 閱讀權限
- 20
- 精華
- 0
- UID
- 742249
- 帖子
- 518
- 積分
- 363 點
- 潛水值
- 27105 米
| 如果你忘記伊莉的密碼,請在登入時按右邊出現的 '找回密碼'。輸入相關資料後送出,系統就會把密碼寄到你的E-Mail。 - List<ComboBox> cbm = new List<ComboBox>();
- List<CheckBox> cbx = new List<CheckBox>();
- List<Label> lab = new List<Label>();
- String[] CbxText = { "Left-Up", "Right-Up", "Left-Down", "Right-Down", "All" };
- String[] CbmText = { "None", "Red", "Pink", "Yellow", "Blue", "Cyan", "Green", "White" };
- private void Add_Click(object sender, EventArgs e)
- {
- setp_item++;
- cbm.Add(new ComboBox());
- panel1.Controls.Add(cbm[setp_item - 1]);
- cbm[setp_item - 1].Location = new Point(485, 7 + (setp_item - 1) * 30);
-
- for (int i = 0; i < CbmText.Length;i++ )
- cbm[setp_item - 1].Items.Add(CbmText[i]);
- cbm[setp_item - 1].SelectedIndex = 0;
- lab.Add(new Label());
- lab[setp_item - 1].BorderStyle = 0;
- lab[setp_item - 1].Size = new System.Drawing.Size(40, 15);
- lab[setp_item - 1].Text = "Step " + setp_item.ToString();
- lab[setp_item - 1].Location = new Point(12, 7 + (setp_item - 1) * 30);
- panel1.Controls.Add(lab[setp_item - 1]);
- for (int i = 0; i < 5; i++)
- {
- cbx.Add(new CheckBox());
- cbx[(setp_item - 1) * 5 + i].Text = CbxText[i];
- cbx[(setp_item - 1) * 5 + i].Size = new System.Drawing.Size(82, 16);
- cbx[(setp_item - 1) * 5 + i].Location = new Point(80 + 83 * (i), 6 + (setp_item - 1) * 30);
- panel1.Controls.Add(cbx[(setp_item - 1) * 5 + i]);
- }
- }
複製代碼 然後根據setp_item去推算哪一個陣列... |
|