Hiding a tab in a TabControl?

G

Guest

How do I hide a tab in a TabControl that contains 3 tabs

I tried the following and it didn't work

tabTab2.Hide(
tabTab2.Visible = Fals

Amjad
 
K

Ken Tucker [MVP]

Hi,

You have to remove the tabpage from the tabcontrol.
TabControl1.TabPages.Remove(TabPage2)


Ken
 
G

Guest

Thanks for your reply Ken.
I don't want to remove the tab page. I just want to hide it (and its controls) and then show it again later.
Removing the tab destroys the controls that have been already created in it, right?

Is it possible?
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?QW1qYWQ=?= said:
How do I hide a tab in a TabControl that contains 3 tabs?

Remove it from the TabControl's 'TabPages' collection.
 
G

Guest

My apologies.. removing the tab page doesn't destroy its controls as I thought before

It worked fine

Thanks everyone
Amja
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top