日期:2014-05-18  浏览次数:20848 次

怎么把自定义空间放到panel中
我像在主窗体中点击一个button,,,之后把相应的自定义控件放到panel中



------解决方案--------------------

TextBox textBox1 = new TextBox();
textBox1.BackColor = Color.White;
textBox1.Location = new System.Drawing.Point(75, 6);
textBox1.Name = "textBox1";
textBox1.Size = new System.Drawing.Size(123, 21);
textBox1.TabIndex = 4;
textBox1.ReadOnly = true;
textBox1.Text = SendName;

 pnl.Controls.Add(textBox1);