Click here to Skip to main content
15,889,411 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a tab container in my windows form, there are almost 10 tabs.
under some circumstances, some events i want to focus on some tab in tabcontainer.

How can it is possible?
Posted
Updated 23-Sep-12 21:31pm
v2

gotcha..

tabcontainer.selectedtab=tabname;
 
Share this answer
 
Suppose you have TabControl1 with two tabs Tab1(index=0) and Tab2(index=1), you can use following code to select Tab2 as default:

tabControl1.SelectedIndex= 1;


Happy Coding !! :)
 
Share this answer
 
Comments
kk2014 24-Sep-12 3:52am    
try this solution,
it works same as dropdown and other controls....
sahabiswarup 24-Sep-12 8:41am    
Thanks..

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