Winddow form: Hide a tab in a TabControl?

  • Thread starter Thread starter Ben
  • Start date Start date
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
 
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.
 
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"));
 
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
 
Back
Top