I am trying to trigger an event when a tab page is removed from my tabControl in C#. I have found a ControlRemoved event and implemented it but when I remove the first tab from my tabcontrol the event is not trigged. The event works for all other tabs being removed (including the tab that would not trigger the event the first time)..
When I trace through my program, the event handler is reached but it doesn't trigger anything.
Can anyone figure out what's going on here?
Code:
tabControl1.ControlRemoved +=new ControlEventHandler(tabControl1_ControlRemoved);
Code:
private void tabControl1_ControlRemoved(object sender, ControlEventArgs e)
{
MessageBox.Show("Tab removed!");
}
Can anyone figure out what's going on here?
Comment