Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tabs out of order
Message
 
To
02/12/2005 14:36:06
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01074362
Message ID:
01074382
Views:
20
This message has been marked as the solution to the initial question of the thread.
From an article I wrote in UTMag:

The bug that is the most irritating is probably the fact that the TabPages of a TabControl occasionally rearrange themselves (change the order of appearance). The problem was very frequent in VS.Net 2002. VS.Net 2003 improves it but didn’t completely fix the problem.

You can easily fix that once for all with simple code. You can use the following code to completely remove TabPages from the TabControl in re-add them in the correct order. It is important to notice that the content of TabPages will not be affected.

With TabControl1.TabPages
.Clear()
.Add(TabPage1)
.Add(TabPage2)
.Add(TabPage3)
.Add(TabPage4)
.Add(TabPage5)
End With

This code needs to be placed anywhere after the call to InitializeComponent. The Form’s Load event is a good place for that.



>I have a windows form with a tab control. The tabs in my designer are in a different order that the tabs in my project. How is this happening?
>
>TIA
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform