[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1132
  • Last Modified:

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.
0
svemir
Asked:
svemir
  • 2
  • 2
1 Solution
 
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
 
gdexterCommented:

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
 
svemirAuthor Commented:
I fix it by changing order in which controlos are added.

Thanks you gdexter!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now