How do you disable a Tab Page within a Tab Control?

  • Thread starter Thread starter Phil
  • Start date Start date
P

Phil

Hello all,
Can anybody give me any ideas on how to disable a tab page within a tab
control.

I have a tab control tabClients with 3 pages. I would like to disable pages
2 & 3 when a certain condition is met.

Thanks in Advance.
Phil.
 
Hello all,
Can anybody give me any ideas on how to disable a tab page within a tab
control.

I have a tab control tabClients with 3 pages. I would like to disable pages
2 & 3 when a certain condition is met.

Thanks in Advance.
Phil.

You can't. What you can do is remove them from the TabControl and add them
again as soon as your condition changes.
 
....that's not strictly true. You can disable a tabpage but, it does not stop
you selecting it, it just stops you interacting with any of its controls.
However, as you say, it is standard practice to remove and reinsert tabpages
as their access level changes.

If you can use a free third party tabcontrol then take a look at
TabControlEX which does allow you to disable tabpages as well as a few other
things you can't usually do.
http://dotnetrix.co.uk/controls.html
 
Thanks for your replies,
I will try adding the tabs and removing them as you suggest.

Phil.

"Mick Doherty"
 

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

Back
Top