Winddow form: Hide a tab in a TabControl?

B

Ben

Is it possible to hide a tab in a Tab Control? Say, there are 3 tabs: tab 1,
tab 2 and tab 3. I want to hide tab 2 depending on the login user access.

Thanks,
Ben
 
B

bryan

our UI guy did something like this by removing the Tab from the TabControl
when he wanted it hidden and not removing it when he wanted it shown.
 
L

Liz

Is it possible to hide a tab in a Tab Control? Say, there are 3 tabs: tab
1,
tab 2 and tab 3. I want to hide tab 2 depending on the login user access.

AFAIK, amazingly enough, no ... you can't hide a tab ... you have to work
around by deleting it and adding it back in

tabControl1.Controls.RemoveAt(1);

tabControl1.Controls.Add(new TabPage("newTab"));
 
M

Muhammad Adil

That is very Intrusting To find That Microsoft Asp tab Control have confusing Property to hide and enable
Well to resolve this Issue try
To Hide Particular tab
TabContainer1.Tabs[0].Enabled = false;
To Enable Particular tab
TabContainer1.Tabs[0]. Visible = false;

Hope that would Resolve your Problum
Regards
Sr. Software engineer
http://www.successcodes.us
 

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