Solved

Show TabPage

Posted on 2004-08-16
2
898 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

679 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