How to sort VB .NET Tab Pages?

Dear expert,

I sort TabPages in Tab Control at design time but they do not appear in the same way at run time. What should I do.

Tnaks, Svemir.
svemirAsked:
Who is Participating?
 
gdexterConnect With a Mentor Commented:

Something like...

Me.TabControl.Controls.Add(Me.TabPage1)
Me.TabControl.Controls.Add(Me.TabPage2)
Me.TabControl.Controls.Add(Me.TabPage3)
Me.TabControl.Controls.Add(Me.TabPage4)
0
 
gdexterCommented:
I have seen this before in my own apps

Go into the Code for the form and look in the "Windows Form Designer generated code" region
and locates the codes that adds the tab pages to the tab ctrl
ensure that the indexes for the tab pages reflect the designers index.

If they do not adjust accordingly

If they do (and this is strange but it seems to work) make sure the that the tab pages are added to the
Tab Control in the order of index.
0
 
svemirAuthor Commented:
Could you please explain this little bit more because first I already check!

"If they do (and this is strange but it seems to work) make sure the that the tab pages are "added" to the
Tab Control in the order of index."
0
 
svemirAuthor Commented:
I fix it by changing order in which controlos are added.

Thanks you gdexter!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.