Solved

Show TabPage

Posted on 2004-08-16
2
900 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: 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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

732 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