Here is i crated label with textbox user control
Here i am using that usercontrol in Form1 in multiple times
我想在Windows窗体中多次使用带有文本框的标签。所以我的问题是如何为控件分配ID?
Panel
控件:https://docs.microsoft.com/en-us/dotnet/framework/winforms/controls/panel-control-windows-forms并执行以下操作:
while (/*Some condition*/ )
{
var newCtrl = new LabelTextEdit();
panel1.Controls.Add(newCtrl);
// Rest of the code
}