TabPage Problem

  • Thread starter Thread starter Sumit
  • Start date Start date
S

Sumit

Hi All,

I am working on an application in which i have 4 tabpages say A, B, C &
D.
Now in one scenario i want that user is able to click on tabs A & B but
the tabs C & D remain disabled for him. (i.e. he cannot click on them &
the respective tabpages are not displayed).

I dont know how to make the tabs of a tabcontrol disabled.

Kindly help me out

Thanks & Regards
Sumit Vohra
 
There is no way to disable the standard TabPage. The only way I know of
to get an effect like this is to temporary remove the "disabled"
TabPage from the TabControl, then add it back when you want it to be
"enabled" again. However, this causes nasty flicker, changes the
selected TabPage when you do it, and you can only add to the end, so it
can change the order of your TabPages.

Microsoft's recommended solution is to disable all of the controls on
the TabPage, which is stupid. I've gone to their feedback site and said
as much. Maybe if enough people complain, they'll fix the TabControl! :)
 
Back
Top