How to disable a tab in tab control?

  • Thread starter Thread starter BVM
  • Start date Start date
If you want to disable a tabpage you must do it through code (i.e.
Tabpage1.enabled = false). This results in all controls on that tabpage
being disabled, but the appearnce of the tabpage Tab is not changed, and the
tab can still be selected. This behaviour is by design.
The general rule for disabling a tabpage is to remove it from the tabcontrol
and re add it when it is re enabled. You will find routines for this on my
site:
http://dotnetrix.co.uk/tabcontrols.html

You will also find a modified tabcontrol on my site which allows you to
disable tabs, as well as giving a few other requested features, such as
change backcolor and mnemonic support.
http://dotnetrix.co.uk/download/TabControlEx.dll

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


Just cannot do it in tabpages. Do you know how to do it?

Thanks,

Dennis
 
Back
Top