TabPages, stop multiple instances of same thing?

G

Gav

Within my application I have a TabControl and I am adding TabPages in
dynamically at run time. My problem is that I am able to create the same
TabPage twice,
ie.
I click on button 1 it creates TabPage 1 and adds it to the TabControl with
the Tab text being 1.
I click on button 1 again it creates TabPage 1 and adds it to the TabControl
with the Tab text being 1.
So now I hve 2 of the same thing.
Is it possible to see if a TabPage already exists with text 1 so I can
prevent multiple instances of the same thing?

thanks

Gav
 

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