Пример #1
0
        private void btn_AddTestProject_Click(object sender, EventArgs e)
        {
            int        ControlCount = this.flowLayoutPanel1.Controls.Count;
            string     ControlName  = "Number" + ControlCount.ToString();
            SetParamer setpara      = new SetParamer();

            setpara.Name  = ControlName;
            setpara.Width = 543;
            this.flowLayoutPanel1.Controls.Add(setpara);
            setpara.modifybtnText("Test" + (ControlCount + 1));
        }
Пример #2
0
        private void btn_addProject_Click(object sender, EventArgs e)
        {
            int    ControlCount = this.flowLayoutPanel1.Controls.Count;
            string ControlName  = "btn" + ControlCount.ToString();

            SetParamer setpara = new SetParamer();

            setpara.Name  = ControlName;
            setpara.Width = flowLayoutPanel1.Width - 30;
            this.flowLayoutPanel1.Controls.Add(setpara);
            //flowLayoutPanel1.Controls.SetChildIndex(setpara, 1);
            setpara.modifybtnText("测试项" + (ControlCount + 1));
            //Button button = new Button();
            //button.Name = ControlName;
            //button.Text = "测试项" + (ControlCount + 1);
            //button.Width = flowLayoutPanel1.Width - 30;
            //this.flowLayoutPanel1.Controls.Add(button);
        }