TabPage Problem

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
 
B

Bruce Wood

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! :)
 

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

Top