C#-将控件动态添加到选项卡页tablepage
tabPage1.Controls.Add(new Button());
实例:
Button cp = new Button();
cp.text="test";
cp.Click += Ckick1;
p1.Controls.Add cp;
cp.left=10;
cp.top=10;
cp.Visible=true;
tabPage1.Controls.Add(new Button());
实例:
Button cp = new Button();
cp.text="test";
cp.Click += Ckick1;
p1.Controls.Add cp;
cp.left=10;
cp.top=10;
cp.Visible=true;