Groupbox重复C# [英] Groupbox duplicate c#
本文介绍了Groupbox重复C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在c#中复制此分组框?
http://imageshack.us/photo/my-images/840/86124798.jpg/ [ ^ ]
How can duplicate this groupbox in c#?
http://imageshack.us/photo/my-images/840/86124798.jpg/[^]
推荐答案
类似的东西:
Something like that:
int i = Convert.ToInt32(textbox1.Text);
while(i > 0)
{
GroupBox mygroupbox = new GroupBox();
foreach (Control ctrl in this.Controls)
{
if(ctrl is GroupBox)
{
GroupBox gbx = (GroupBox)ctrl;
mygroupbox = gbx;
break;
}
}
this.Controls.Add(mygroupbox);
i--;
}
问候,
KZ
Regards,
KZ
这篇关于Groupbox重复C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文