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
Solved

Show TabPage

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Service Controller 1 27
Moving code from one TFS branch to another 3 33
C# bracket error 3 35
defining NULL or 0 10 44
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 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