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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With