Hi ,
I have a tab control with 3 tab pages in it. I have to catch the event when the selected tab is changed. Initially I though it was tabPage_Click event. Later on I came across, tabControl_SelectedIndexChanged event for the tab control itself. And I handled it as under...
Code:
        private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
             switch (tabControl1.TabIndex)
             {
                 case 0:
                     OnTab1();
                     break;
                 case 1:
                     OnTab2();
                     break;
                 case 2:
                     OnTab3();
                     break;
             }
        }
Yet even when I change the the tab page from tab page 1 to other...OnTab1() is being executed, no matter what. So please tell me what shall use to switch? I also read some where that the tabpage_Click event handles any click in side the tab page's client area. So that is not what I am looking at. I have also looked at SelectTab() and DeselectTab() methods and more...Yet to find a solution. Please help
Thanks
Bhushan