Solved

Show TabPage

Posted on 2004-08-16
2
893 Views
Last Modified: 2010-05-18
Hello

I have a tab Control with a few pages, When a button is clicked on the form I want TabPages[1] to be the active TabPage.

Fo eg if TabPages[0] is the  current page in the control when the cutton is clicked I want TabPages[1] to be shown.

How can I do this?

I tried a few things such as

this.tabControl1.TabPages[1].Focus();

but that doesn't work,, any ideas?
0
Comment
Question by:auk_ie
2 Comments
 
LVL 19

Accepted Solution

by:
drichards earned 400 total points
ID: 11812339
This will do it:

  tabControl1.SelectedIndex = 1;  // Use index of desired tab here
0
 
LVL 7

Assisted Solution

by:dttri
dttri earned 100 total points
ID: 11812454
 Hi,
  You can try this code:

private void button2_Click(object sender, System.EventArgs e)
{
      this.tabControl1.SelectedIndex=1;
}

  This will make the second (C# is zero-based index) tab page selected.

  Tri
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now