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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top