Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tabs out of order
Message
 
À
02/12/2005 14:36:06
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01074362
Message ID:
01074382
Vues:
21
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform