Solved

Show TabPage

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 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

18 Experts available now in Live!

Get 1:1 Help Now