Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用代码添加一个按钮、复选框、选项卡控件和类似的东西。我怎样才能做到这一点?
其实我想添加一些东西到tabcontrol。
我正在使用 C#。
ref:如何动态生成 TextBox 控件。
TextBox txt = new TextBox(); txt.ID = "textBox1"; txt.Text = "txtbox"; tabcontrol1.Controls.Add(txt); Label lbl = new Label(); lbl.Text = "Lbl"; tabcontrol1.Controls.Add(lbl);
查看 SDK 示例,您有很多关于如何执行此操作的示例。