Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int startLocation = 142;
- for (i = 0; i < ingridients.Length; i++)
- {
- box = new CheckBox(); //Create new checkBox
- box.Tag = i;//CheckBox (Tag 0-..)
- box.TabIndex = 8 + i;//Последовательность "выбора" через TAB
- box.Text = ingridients[i];
- box.AutoSize = true;
- box.Location = new Point(2, startLocation);
- startLocation += 25;
- this.Controls.Add(box);
- }
- for (int n = 0; n<i; n++)
- {
- if (box.Tag[n].Checked = true )
- {
- }
- }
- foreach (CheckBox chbox in this.Controls.OfType<CheckBox>())
- {
- if (chbox.Checked) { /*...*/ }
- }
- List<Checkbox> _chBoxLst = new List<Checkbox>();
- int startLocation = 142;
- for (i = 0; i < ingridients.Length; i++)
- {
- _chBoxLst (new CheckBox()); //Create new checkBox
- //дальше идентично твоему коду
- }
Add Comment
Please, Sign In to add comment