Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tab not going where I want
Message
 
À
22/06/2004 13:41:23
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00916126
Message ID:
00916656
Vues:
7
Tony,

>I created a Maintence form with the two tabs ListPage and Properties on it.
>
>I added a couple more tab pages and in the collections moved one of my new tabs to the top since I wanted it to show first.
>
>When I run the application the ListPage shows instead of my new tab page.
>
>How do I change the form to show my own tab page first?

Since the other two tab pages get added first (because the constructor and InitializeComponent of the parent form fire first) they appear first in the TabControl. To change the order, you can add code in the constructor of your form (after the call to InitializeComponent) that removes the two inherited pages and adds them back in again. For example:
this.TabControl.Controls.Remove(this.ListPage);
this.TabControl.Controls.Remove(this.PropertiesPage);
this.TabControl.Controls.Add(this.ListPage);
this.TabControl.Controls.Add(this.PropertiesPage);
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform