I am creating a windows form using vs2010 and c#. I want to make each opened form to produce a new tab field in my main tab control.
Any idea how this can be done?
thanks in advance.
Add new tab in every new opened form
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Mahesh ChandRank #1 · 393K pointsPosted Oct 3, 2010, 5:16 AM EDT
Something like this:
TabPage newPage = new TabPage("New Page");
tabControl1.TabPages.Add(newPage);
Here is an article on TabControl and also talks about how to add and remove tab pages dynamically:
Working with Windows TabControl with C#
George Paroglou79 pointsPosted Oct 5, 2010, 2:19 AM EDT
The .add is not an accepted option.
George Paroglou79 pointsPosted Oct 6, 2010, 3:16 AM EDT
http://help.infragistics.com/Help/NetAdvantage/WinForms/2010.1/CLR2.0/html/Infragistics2.Win.UltraWinTabControl.v10.1~Infragistics.Win.UltraWinTabControl.UltraTabControlKeyActionMappingsCollection.html
The problem is that I want to have duplicated tabs with the same text name and this is not allowed cause of the unique keys that requires.
Any idea how can I have active more than one tab of the same text name and context?