?
Solved

Moving tab pages

Posted on 2004-11-19
3
Medium Priority
?
174 Views
Last Modified: 2010-04-23
Hi,

Is there a way to move tab pages around on the tab control.  I have about 10 tab pages and according to a checkbox i want to make one of the middle ones disappear and be replaced by another one, but the others to stay the same.  How can this be done?

Regards,
Michael
0
Comment
Question by:Xavior2K3
3 Comments
 
LVL 28

Expert Comment

by:iboutchkine
ID: 12629099
Dim colRemovedTabs As New Collection()
TabPage1 = TabControl1.TabPages(1)
colRemovedTabs.Add(TabPage1,  
    TabPage1.Name)
TabControl1.Controls.Remove(TabPage1)

For adding the control back:

TabControl1.Controls.Add(colRemovedTabs("TabPage2"))
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 1000 total points
ID: 12629631
I use this code to insert tabpage in correct order:

With TabControl1.TabPages
    .Clear()
    .Add(TabPage1)
    .Add(TabPage2)
    .Add(TabPage3)
    .Add(TabPage4)
    .Add(TabPage5)
End With

You can change the order of .Add to change the order in which they appear.
0
 
LVL 1

Author Comment

by:Xavior2K3
ID: 12629893
Thanks, just what im looking for!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question