Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Visual Basic (Classic) FAQ


Work-a-round for shifting TabPages on Windows form Tab control by SBendBuckeye
Posted: 2 Aug 05 (Edited 2 Aug 05)

When you use a Tab control in a .Net Windows form and then change the TabPage order using the items property, it does not always display properly. This is a known and documented bug which has not been fixed.

I ran into it recently and found a handful of solutions, the best of which seemed to be adding the TabPages into the Tab's controls array manually when the form loaded:


'Assumes a tab control named tc and 4 TabPages
tc.Controls(0) = tabPage0
tc.Controls(1) = tabPage1
tc.Controls(2) = tabPage2
tc.Controls(3) = tabPage3
I set the index value in the Tag property and then ensured the correct order by doing something like this:


Dim index As Integer
For Each tp As TabPage In Me.tc.TabPages
    index = CInt(tp.Tag)
    Me.tc.TabPages(index) = tp

Back to Visual Basic (Classic) FAQ Index
Back to Visual Basic (Classic) Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close