Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tab not going where I want
Message
 
To
22/06/2004 13:41:23
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00916126
Message ID:
00916656
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform