Reputation: 614
My client wants to have two separate tab lists on a form, but only one tab can be selected of the two tab lists. Can I create two TabControl
s to work like this? I.e. when one tab is selected at the first TabControl
, the other should have all of their tabs deselected and vica versa.
EDIT:
This is what he imagined:
Upvotes: 0
Views: 416
Reputation: 6948
If I understand you correctly, you can put a tabcontrol(tabcontrol1) on a form. Add a tabpage for each set of pages you want to show.
On each tabpage, in tabcontrol1, add another tabcontrol and add however many pages you want in each.
To restrict access to a particular tab in tabcontrol1 set its enabled property to false;
Basically you'll end up with nested tabpages
Another option would be to create collections of tabpages that you could swap in and out of a single tabcontrol.
One way to get close to what you're pic shows is to use panels and put the tabcontrols inside them.
Upvotes: 0
Reputation: 885
Based on your image, I believe you should use RadioButtons
. That limits selection to only 1 button but you can put them wherever you want. Then you could have a container that populates based on which button is selected.
Upvotes: 1