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 !
 
Back
Top