Hi guys I'm trying to change the order of tabpages but whatever I do I fail.
I have a total of 24 tabpages and what I would like to do is
keep the first 5 tabpages as it is ( index 0 to 4 will remain same) and move the pages 16 to 23 (index 15 to 22) at index 5
so it should look something like this:
index:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
page number:
1 2 3 4 5 16 17 18 19 20 21 22 23 6 7 8 9 10 11 12 13 14 15 24
to accomplish this task I tried to following code:
for (int i = 23; i >= 16; i--)
{
TabPage loTabPage;
loTabPage = this.myCustomTab.TabPages[i];
this.myCustomTab.TabPages.RemoveAt(i);
this.myCustomTab.TabPages.Insert(5, loTabPage);
}
but the above code fails, any suggestions?