Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi !

I have a tabControl and i want, the program shows second tab when user clicked on a button so how can i do it?

:Doostl
Posted
Comments
Sergey Alexandrovich Kryukov 27-Feb-12 17:16pm    
Normally, you need to specify exact type and tag you UI library. There are more than one type called "TabControl".
Which one?
--SA

it depends what tab control you are using. Most have a client-side API that allows you to set the active tab.
 
Share this answer
 
C#
tabControl.SelectedItem = tabPage;

or
C#
tabControl.SelectedIndex = n; // where "n" is the index of the desired tab
 
Share this answer
 
v3
tabControl1.SelectedTab.Text == "string" //where string is a text of tab text
 
Share this answer
 

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