Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
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 14-Jul-12 3:00am
Edited 14-Jul-12 3:19am
v2
Comments
OriginalGriff at 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 at 14-Jul-12 8:22am
   
k
Kenneth Haugland at 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 at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 15-Jul-12 0:30am
   
Agree. Besides, OP's idea on the UI design is such an abuse... My 5.
--SA
Dave Kreskowiak at 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)

  Print Answers RSS
0 OriginalGriff 8,149
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 14 Jul 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100