Disable tab control pages

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to stop a different tab control page from being selected
without disabling the entire tab control? (The user needs to be able to use
the controls on the tab page but shouldn't be able to select a different tab
page). If I can stop the selectedindexchanged event from bubbling up I think
that would work but e.Handled doesn't exist for the EventArgs that are used
by this event. Is there another way to stop the event bubbling up higher than
my SelectedIndexChanged event handler?
 
Hi Steve,

Handle the TabControl.Deselecting event, verify if the active tab may be deselected and set the e.Cancel property accordingly.
 
Back
Top