Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to activate second page
Message
From
18/11/2006 06:46:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/11/2006 05:04:59
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01170933
Message ID:
01170940
Views:
7
This message has been marked as the solution to the initial question of the thread.
>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());
>        }
>    }
> }
>
   // tabPage2.Select();
   tabControl1.SelectedTab = tabPage2;
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform