Preventing TabPage selection ... how?

  • Thread starter Thread starter JezB
  • Start date Start date
J

JezB

I want to prevent a TabPage being visited under certain conditions. To do
this I put the validation in the TabControl's SelectedIndexChanged event and
if I want to disable access I programmatically set the index back to what it
was.

This does work but at runtime the user momentarily sees the tab page that he
clicked on before being taken back to the one he came from. There must be a
neater way - please someone enlighten me !
 

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