Reputation: 161
I am using VS2010 (C#) and I want to create a button that creates a new tab. I already have a tabControl
container created. How would I do this?
Upvotes: 0
Views: 87
Reputation: 244777
Moved here from Brandon's solution in the question:
string title = "TabPage " + (tabControl1.TabCount + 1).ToString();
TabPage myTabPage = new TabPage(title);
tabControl1.TabPages.Add(myTabPage);
Upvotes: 1