Is it somehow possible to disable one (or more) tabs of tab control? At some point I need to make user stay on the active tab and prevent him from leaving… I know I can disable the whole TabControl component, but that disables also all components on active tab…
I also tried to use the Selecting method of TabControl:
private void TabControl_Selecting(object sender, TabControlCancelEventArgs e) {
e.Cancel = PreventTabSwitch;
}
This works, prevents user from switching (if PreventTabSwitch==true), but since all tabs look active and just don’t react it’s confusing…
There is no Enabled property for individual tab pages, so I don’t know what else to do…
Thanks a lot for in advance for all tips.
IIRC, this is the only way to prevent a user from switching tabs.
I presume you are preventing them from leaving as validation on the form has failed? Using the ErrorProvider component would provide some sort of visual cue that they need to do something before switching tabs.