How to handle when TabPages are bein added and removed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi! Does someone know, whether it is possible to handle when TabPage is being
deleted or added. As I've understood, it's not possible to use ControlAdded
and ControlRemoved removed, because they are used fot ControlCollection.

Is it a way to solve my problem? Any suggestions are welcomed.
 
ControlAdded and ControlRemoved works just fine, because that's were
the tabs end up when you add them to the TabPages collection.

/claes
 
Private Sub TabControl1_ControlRemoved(ByVal sender As Object, ByVal e As
System.Windows.Forms.ControlEventArgs) Handles TabControl1.ControlRemoved
Debug.WriteLine("A tab page (or other control) was removed")
End Sub

Private Sub TabControl1_ControlAdded(ByVal sender As Object, ByVal e As
System.Windows.Forms.ControlEventArgs) Handles TabControl1.ControlAdded
Debug.WriteLine("A tab page (or other control) was added")
End Sub

/claes
 
Back
Top