Microsoft Communities

Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

How do I dynamically hide and unhide tabs in a TabControl?

It's a common mistake to try to use the Visible property of the TabPage to make the tab invisible. But this does not work (The Visible property of the TabPage is essentially obsolete). The TabControl doesn't provide you an easy way to do so.

The workaround is to remove and add the TabPage from the TabControl whenever you want to hide/unhide it. Refer to How do I programmatically insert or delete tab pages in a TabControl? in this FAQ for more information.

Contributed from George Shepherd's Windows Forms FAQ



Page view counter