Here is a frustrating problem I've been experiencing while developing a windows application in VB .NET 2003 Standard. I have a Tab Control which I've added tab pages to with unique content to each page. the Tab Control has 12 tab pages in the TabPages collection. I use the TabPage Collection Editor to add/delete/update the pages and the pages are setup in a particular order that I want. In addition VB automatically adds code to the form's InitializeComponent event to layout the pages in the proper order. Below is the code which adds the pages and in which order they are to be added. The number on each of those pages is the order they should be in.
Me.tcSelections.Controls.Add(Me.tp0CustType)
Me.tcSelections.Controls.Add(Me.tp1HOModel)
Me.tcSelections.Controls.Add(Me.tp2RespModel)
Me.tcSelections.Controls.Add(Me.tp3ListMP)
Me.tcSelections.Controls.Add(Me.tp4ClusterStatus)
Me.tcSelections.Controls.Add(Me.tp5CPModel)
Me.tcSelections.Controls.Add(Me.tp6FICO)
Me.tcSelections.Controls.Add(Me.tp7CFCredit)
Me.tcSelections.Controls.Add(Me.tp8RiskRank)
Me.tcSelections.Controls.Add(Me.tp9Lang)
Me.tcSelections.Controls.Add(Me.tb10States)
Me.tcSelections.Controls.Add(Me.tb11Branches)
Here is the problem. At indiscriminate times while I am adding code, editing the form controls, executing the program, hell whenever it seems, VB will change the order of the tab pages. Below is an example of the new order.
Me.tcSelections.Controls.Add(Me.tp0CustType)
Me.tcSelections.Controls.Add(Me.tp1HOModel)
Me.tcSelections.Controls.Add(Me.tp5CPModel)
Me.tcSelections.Controls.Add(Me.tp3ListMP)
Me.tcSelections.Controls.Add(Me.tp4ClusterStatus)
Me.tcSelections.Controls.Add(Me.tp9Lang)
Me.tcSelections.Controls.Add(Me.tp6FICO)
Me.tcSelections.Controls.Add(Me.tp7CFCredit)
Me.tcSelections.Controls.Add(Me.tp8RiskRank)
Me.tcSelections.Controls.Add(Me.tp2RespModel)
Me.tcSelections.Controls.Add(Me.tb10States)
Me.tcSelections.Controls.Add(Me.tb11Branches)
To correct this I have to go into the InitializeComponent section and reorder the pages. Sometimes I can go into the TabPage Collection editor and put the pages back in proper order and click OK to correct the order. Even that approach sometimes does not work.
Why is VB exhibiting this desctructive behavior? How do I correct the situation?
Me.tcSelections.Controls.Add(Me.tp0CustType)
Me.tcSelections.Controls.Add(Me.tp1HOModel)
Me.tcSelections.Controls.Add(Me.tp2RespModel)
Me.tcSelections.Controls.Add(Me.tp3ListMP)
Me.tcSelections.Controls.Add(Me.tp4ClusterStatus)
Me.tcSelections.Controls.Add(Me.tp5CPModel)
Me.tcSelections.Controls.Add(Me.tp6FICO)
Me.tcSelections.Controls.Add(Me.tp7CFCredit)
Me.tcSelections.Controls.Add(Me.tp8RiskRank)
Me.tcSelections.Controls.Add(Me.tp9Lang)
Me.tcSelections.Controls.Add(Me.tb10States)
Me.tcSelections.Controls.Add(Me.tb11Branches)
Here is the problem. At indiscriminate times while I am adding code, editing the form controls, executing the program, hell whenever it seems, VB will change the order of the tab pages. Below is an example of the new order.
Me.tcSelections.Controls.Add(Me.tp0CustType)
Me.tcSelections.Controls.Add(Me.tp1HOModel)
Me.tcSelections.Controls.Add(Me.tp5CPModel)
Me.tcSelections.Controls.Add(Me.tp3ListMP)
Me.tcSelections.Controls.Add(Me.tp4ClusterStatus)
Me.tcSelections.Controls.Add(Me.tp9Lang)
Me.tcSelections.Controls.Add(Me.tp6FICO)
Me.tcSelections.Controls.Add(Me.tp7CFCredit)
Me.tcSelections.Controls.Add(Me.tp8RiskRank)
Me.tcSelections.Controls.Add(Me.tp2RespModel)
Me.tcSelections.Controls.Add(Me.tb10States)
Me.tcSelections.Controls.Add(Me.tb11Branches)
To correct this I have to go into the InitializeComponent section and reorder the pages. Sometimes I can go into the TabPage Collection editor and put the pages back in proper order and click OK to correct the order. Even that approach sometimes does not work.
Why is VB exhibiting this desctructive behavior? How do I correct the situation?