Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Hide Tabpage

Hide Tabpage

Scheduled Pinned Locked Moved Visual Basic
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohamed Ishak
    wrote on last edited by
    #1

    Dear all, Anyone can hide the tabpages in tabcotrol Don't tell follows Me.TabControl1.TabPages.Item(0).Visible = False This is not working And also can you draw line on tabpages rugfy Ishak

    R 1 Reply Last reply
    0
    • M Mohamed Ishak

      Dear all, Anyone can hide the tabpages in tabcotrol Don't tell follows Me.TabControl1.TabPages.Item(0).Visible = False This is not working And also can you draw line on tabpages rugfy Ishak

      R Offline
      R Offline
      rwestgraham
      wrote on last edited by
      #2

      rugfy wrote: Anyone can hide the tabpages in tabcotrol You cannot hide the page, but you can use the TabPages collection of the Tab Control to remove the page altogether. If you need to be able to add the TabPage back dending on some condition, you can save the TabPage in a Collection before you remove it. Because adding the page back in order is a hassle, the easiest thing to do is when you initialize the form, add all TabPages to the collection in the correct order. Then if you remove a TabPage and need to add it back later, just remove all TabPages and then replace them all in order from the collection. Of course, you will lose any data that has been entered if you use this approach, so you may have to add additional code if you need to maintain the data state... You can draw a line on a TabPage using the Graphics object. However, if you are going to be removing tabpages at run time, the events could get complicated. The easiest way to create a line is to create a Panel on the tab page, set it's BackColor to the color of the line you want, and set it's height to 1 pixel.

      M 1 Reply Last reply
      0
      • R rwestgraham

        rugfy wrote: Anyone can hide the tabpages in tabcotrol You cannot hide the page, but you can use the TabPages collection of the Tab Control to remove the page altogether. If you need to be able to add the TabPage back dending on some condition, you can save the TabPage in a Collection before you remove it. Because adding the page back in order is a hassle, the easiest thing to do is when you initialize the form, add all TabPages to the collection in the correct order. Then if you remove a TabPage and need to add it back later, just remove all TabPages and then replace them all in order from the collection. Of course, you will lose any data that has been entered if you use this approach, so you may have to add additional code if you need to maintain the data state... You can draw a line on a TabPage using the Graphics object. However, if you are going to be removing tabpages at run time, the events could get complicated. The easiest way to create a line is to create a Panel on the tab page, set it's BackColor to the color of the line you want, and set it's height to 1 pixel.

        M Offline
        M Offline
        Mohamed Ishak
        wrote on last edited by
        #3

        Thanx a Lot But I don't need it ,My actual Think is i want to give the distance between two pages like seperator in toolbar for some elegant look.thats all.In this case my doubt is whats the use of Tabcontrol.Tabpages(0).Vaiable = False Does it doing nothing Thats Why Any way Once Thanx For your reply Ishak

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups