This will still require you to ownerdraw the tabcontrol in order to get the
The recommended method is to remove tabpages rather than disable them. You
will find methods to remove and re-insert tabpages on my site. http://dotnetrix.co.uk/tabcontrols.html --> Hide and Show Tabpages in a
If you really want to disable tabs, and have them appear disabled, but do
not want to write lots of code to do it then you need a third party control.
I have a simple suggestion if you are using VS2010 instead of enabling and disabling a tab
Add the tab pages in design time and if don't need a tab then remove it on runtime like below TabControl1.Controls.Remove(TabPage2) where TabControl1 is the tabbed control and TabPage1 is the second tab
You could readd anytime by using add method of the controls. TabControl1.Controls.Add(TabPage2) In order to invalidate the controls, please include the following line TabPage3.Refresh()
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.