Click here to Skip to main content
15,879,613 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear friends,

I have a project in Tab control.

I have three tabs in that Tab Control named (First_Tab, Second_Tab, Third_Tab). In that same form i have three Buttons named (First_Button, Second_Button, Third_Button).

I need, When i click the First_Button, ---> From the Tab Control, First_Tab will Enable and others looks Disable format user can't do any change in other tabs (2,3 tabs) except First_Tab.

When i click the Second_Button, ---> From the Tab Control, Second_Tab will Enable and others looks Disable format user can't do any change in other tabs (1,3 tabs) except Second_Tab.


When i click the Third_Button, ---> From the Tab Control, Third will Enable and others looks Disable format user can't do any change in other tabs (1,2 tabs) except Third_Tab.


Please give some ideas.........

[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 14-Jul-12 2:19am
v2
Comments
OriginalGriff 14-Jul-12 8:19am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
vasanthkumarmk 14-Jul-12 8:22am    
k
Kenneth Haugland 14-Jul-12 11:36am    
Im having a hard time understanding why you just dont use the Tab control as they are.... If there is some code block you want to execute you could simply do this in tab got focus (or I dont know the ekvivalent in WindowsForms)
Sergey Alexandrovich Kryukov 15-Jul-12 0:31am    
I agree. And in Forms this is very simple to do. OP's idea is just the impossible abuse, should not be implemented.
--SA

1 solution

You can't disable tabs. The only thing you can do to stop a user from selecting a tab is to remove the TabPage from the control and readd it when it's valid to do so.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 15-Jul-12 0:30am    
Agree. Besides, OP's idea on the UI design is such an abuse... My 5.
--SA
Dave Kreskowiak 15-Jul-12 8:35am    
It's derived from a lack of using Windows applications. There are just things you don't see done in other applications, but because of a lack of innovation but because it's just stupid.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900