TabControl & TabPage Question

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
 
M

Mick Doherty

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
 

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

Top