Link to home
Start Free TrialLog in
Avatar of BlakeMcKenna
BlakeMcKennaFlag for United States of America

asked on

Is there a trick to use the Hide() / Show() Methods?

I have a Tab Control on my form that contains several TabPages. I wish to be able to view/hide them at will using the Hide() and Show() Methods but I'm not having any luck with it. Initially when my form is shown, the tabs default are that you cannot see them. I was using the code below to do this and it did what it was supposed to do.

            tabTests.TabPages.Remove(tabCreepTest)
            tabTests.TabPages.Remove(tabShuntTest)
            tabTests.TabPages.Remove(tabElectricalTest)
            tabTests.TabPages.Remove(tabRecoveryTest)
            tabTests.TabPages.Remove(tabRepeatabilityTest)
            tabTests.TabPages.Remove(tabReproducabilityTest)

However, when I saw the Hide() and Show() Methods, it seemed much easier to control the TabPages visibility.
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BlakeMcKenna

ASKER

I research a little more and found that worked. Thanks for the confirmation!