How to easily reorder TabControl?
35,408
Solution 1
In the properties of the tab control there's a TabPages collection. You should be able to shuffle them around in there. Just click the ellipses next to TabPages and a dialog will appear allowing you to move each one up or down in the order.
Solution 2
Mark the TabControl in the Designer.
In the Properties Window (F4) you have a TabPages Property. You can open a new Window where you can reorder the TabPages.
If you want to do that at runtime you have to do
tabControl.TabPages.Remove(tabPage1);
tabControl.TabPages.Add(tabPage1); // add to the end
tabControl.TabPages.Insert(2, tabPage1); // add on specific position
Author by
CJ7
Updated on April 03, 2021Comments
-
CJ7 about 3 years
I have a
TabControl
which I have designed in the VS2005 designer that has about 7 tabs.How can I easily switch the order of the tabs around?
I put one tab at the end in a rush, but now I want it somewhere in the middle.