Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to activate second page
Message
From
18/11/2006 05:04:59
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
How to activate second page
Miscellaneous
Thread ID:
01170933
Message ID:
01170933
Views:
51
I need that enter and mouseclick in tabcontrol first page
activates tabcontrol second page.
I tried the following code but button click is ignored.
How to activate second page in .net 1.1 ?

using System;
using System.Windows.Forms;

namespace tabpagenotactivated
{
public class Form1 : Form
{
public Form1()
{
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.button1 = new System.Windows.Forms.Button();
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabPage1.Controls.Add(this.button1);
this.button1.Location = new System.Drawing.Point(25, 39);
this.button1.Text = "activate second page";
this.button1.Click += new System.EventHandler(this.button1_Click);
this.Controls.Add(this.tabControl1);
}
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.Button button1;
private void button1_Click(object sender, EventArgs e)
{
tabPage2.Select();
}
}
static class Program
{
static void Main()
{
Application.Run(new Form1());
}
}
}
Andrus
Next
Reply
Map
View

Click here to load this message in the networking platform