Thursday, July 9, 2009

C# .Net - How do I hide tabControl tabs (not tabPages)?

I am working in C# .Net and more specifically with a smart device (pocket pc) How do I hide the selectable tabs in a tabControl. I want to change the tabs programmatically and not allow users to see or select the tabs. Your help would be very much appreciated! I have looked for this answer all over the internet and haven't found the answer. Thanks!!

C# .Net - How do I hide tabControl tabs (not tabPages)?
I'm not sure I understand. If you don't want users to see/use other tab pages in a tab control, why use the control? The tab control is just a container/manager of panel controls. If you paint your controls into a series of panel controls, you could simply hide/show the appropriate panel as necessary.





Like most controls, tab pages have both Enabled and Visible properties. You should be able to set these to false to render the specific page available and unavailable. However, there may be some unnecessary blinking from using a tab control poorly.


No comments:

Post a Comment