Learn to Order Tabcontrol in C#
This bug is annoying. I am currently developing a windows mobile application and I am using the TabControl control. I dont have any problem ...

The only problem I have is when I tried to debug the order of TabPages get shuffled. This is a problem because my action depends on the tab index.
I don't know what's causing this, but I thought re adding the TabPages on RunTime might work, and it really work for me. So here's the pseudocode.
tabControl.TabPages.Clear(); //first clear the tabcontrol
//then readd your tabs
tabControl.TabPages.Add(tabOne);
tabControl.TabPages.Add(tabTwo);
tabControl.TabPages.Add(tabThree);
tabControl.TabPages.Add(tabFour);
Remember this code should be add after the InitializeComponent method in the main constructor.
Post a Comment