TabControl & TabPage Question

  • Thread starter Thread starter Stan Sainte-Rose
  • Start date Start date
S

Stan Sainte-Rose

Hi guys

I have a little problem with the tabcontrol.
I add and remove tabpage using the following methods :
TabControl1.Controls.Add(tabpagex)
TabControl1.Controle.Remove(tapagex)

But how to know when the tabpagex is already added ?
Stan
 
If Not TabControl1.Tabpages.Contains(tabpagex) Then
TabControl1.Tabpages.Add(tabpagex)
End If

If TabControl1.Tabpages.Contains(tabpagex) Then
TabControl1.Tabpages.Remove(tabpagex)
End If
 
Back
Top