In Vb.net 2003 , Tab Pages Visiblity Problem?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ganeshvkl
    New Member
    • Jul 2008
    • 50

    #1

    In Vb.net 2003 , Tab Pages Visiblity Problem?

    HI,
    I'm doing Vb.net 2003 Windows application. In that at Design time in tab control i have 5 Tab Pages , Each Tab pages contains different set of controls(Comman d Button , Text Box).Depends on the User Selection , i have to set visibilty on the Tab Pages .... I Try it out Like

    Tabcontrol1.tab pages(0).visibl e = false ,

    It's not Working... It's Urgent.........

    Any Response is Appreciated

    Thanx in Adv

    Ganesh
  • joedeene
    Contributor
    • Jul 2008
    • 579

    #2
    I don't think that the TabPage Class has the .Visible property as most controls, if you look in the designer view, for the properties of the selected tabpage(not tabcontrol), it doesn't have a .visible property.

    joedeene
    Last edited by joedeene; Oct 11 '08, 05:03 PM. Reason: Added Link

    Comment

    • jg007
      Contributor
      • Mar 2008
      • 283

      #3
      try this -

      Code:
       TabControl1.TabPages.Remove(TabPage2)
      just replace ' tabpage2 ' with the name of the page, if you want to re-add it use the .insert option -

      Code:
              TabControl1.TabPages.Insert(TabControl1.TabPages.Count, TabPage2)
      I am using visual studio 2008 but the code 'should' be the same :)

      Comment

      • ganeshvkl
        New Member
        • Jul 2008
        • 50

        #4
        HI,
        Thanx for u'r Reply...

        In Vb 6, sstab1.tabvisib le(1) = false it's working Fine, I need Equivalent for this in VB.net 2003

        Bye

        Ganesh

        Comment

        • jg007
          Contributor
          • Mar 2008
          • 283

          #5
          Originally posted by ganeshvkl
          HI,
          Thanx for u'r Reply...

          In Vb 6, sstab1.tabvisib le(1) = false it's working Fine, I need Equivalent for this in VB.net 2003

          Bye

          Ganesh
          have you tried using the code? it should work with vb 2003

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Originally posted by ganeshvkl
            HI,
            Thanx for u'r Reply...

            In Vb 6, sstab1.tabvisib le(1) = false it's working Fine, I need Equivalent for this in VB.net 2003

            Bye

            Ganesh
            Removing the tab IS the equivalent for .NET

            Comment

            Working...