Results 1 to 4 of 4

Thread: [RESOLVED] [2005] Showing And Hiding Tabs

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    [RESOLVED] [2005] Showing And Hiding Tabs

    I'm using the TabControl on a data entry form and I have particular tabs that I only want to be visible when certain check boxes are checked.

    I noticed that the TabPanel object has .Show and .Hide methods but they only show/hide the controls on the tab and not the tab itself.

    Is there a way of hiding the whole tab so that it is not visible attall in the tab control?
    Last edited by simonm; Jan 31st, 2007 at 10:36 AM.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Re: [2005] Showing And Hiding Tabs

    The best advice I've seen around is to add and remove the tab pages instead of trying to show and hide them. Seems that feature of the control was overlooked, or looked at very stupidly.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Frenzied Member vbdotnetboy's Avatar
    Join Date
    Jun 2004
    Location
    Lewisburg, PA "Next year Raiders in the Super Bowl"
    Posts
    1,310

    Re: [2005] Showing And Hiding Tabs

    so long as you know what the name name of the tab and it's index you may want to create class for this but do something like the following

    VB Code:
    1. Me.TabControl1.TabPages.Remove(Me.TabPage1)
    2. Me.TabControl1.TabPages.Insert(0, Me.TabPage1)

    Derek - Using VS 2008 99% of the time and VS 2003 1% of the time

    Please Help Us To Save Ana

    ● Helpful Links: DNR TV | Awesome site for tips | Using ADO.NET to work with Excel | Xml Namespace 2.0 Framework Changes|Ultra High Security Password Generator | Mendhak's ADO.NET Tutorial
    ● Code Bank: Random Password Generator | Generic DbProviderFactory Access
    ● Site Work: Bottle Run Xtreme | Spaids Racing.com

    Company I work for - CSSI

    WHEN POSTING PLEASE INDICATE VERSION

    Please use vbcode tags or code tags when posting code
    [highlight=vb]ALL your code goes here[/highlight] or [code]ALL your code goes here[/code]

    If my post helped you in anyway... please be kind and give me some ratings

  4. #4

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: [2005] Showing And Hiding Tabs

    Thanks fellows!
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width