Say I have a tab control with tabs Tab1 And Tab2. How do I switch the selected tab programmatically, say on button1 click event. Sample code would be appreciated.
Thanks in advance.
jackabascal
0
Newbie Poster
Recommended Answers
Jump to PostHello jackabascal,
private void button1_Click(object sender, EventArgs e) { this.tabControl1.SelectedTab = this.tabControl1.TabPages["Tab2"]; }
Should work
Cheers
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.