Advertisement

07.16.2008 at 08:41AM PDT, ID: 23570116
[x]
Attachment Details

C# WinForm TabControl SelectedIndexChanged not being kicked off when differnt Tabs Are clicked

Asked by pugmi16 in C# Programming Language

Tags: C#

Hello,
 
    I have a winform that I added a tabcontrol to.... then I added 4 tabs.... I then went into the code behind and added the following:      

     private void tabControl1_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            MessageBox.Show("AHHHHHHHH");
        }

See entire Progam below......

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void tabControl1_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            MessageBox.Show("AHHHHHHHH");
        }
    }

}

when I run this program and click on the different tabs I would expect it to pop up AHHHHHH as this event is triggered....  but I can click away from tab to tab and nothing ever gets triggered.... I set a breakpoint in the SelectedIndexChanged and it never is callled.... what am I doing wrong????

                                                Thanks!Start Free Trial
[+][-]07.16.2008 at 08:59AM PDT, ID: 22017246

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C# Programming Language
Tags: C#
Sign Up Now!
Solution Provided By: p_davis
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628