First, I have to agree with you that the whole TabControl / TabPage
implementation is a mess. It has all sorts of problems and doesn't fit
in cleanly with the other controls in Windows Forms.
That said, the problem you're pointing out is partly one of semantics.
Whoever wrote the TabPage code decided that "Visible" meant that the
tab page was topmost and showing its contents, so from this point of
view setting "Visible" to "false" (which is what most of us are trying
to do) is an attempt to tell the tab page to un-select itself and let
some other tab page come to the front ("be visible"). That this was not
a good design decision is made evident by the large number of
programmers asking why setting a tab page to "visible = false" "doesn't
work."
Even with this, TabPages are so full of problems that I don't even know
if saying myTabPage.Visible = true would bring a tab page to the fore.
Who knows. Maybe it does.
As for the Enabled property, I have no idea.
The only way to make a tab page disappear from the choices you see is
to .Remove() it from the TabControl and then .Add() it back in when you
want it to show up, which isn't a very nice solution at all. (It also
changes the tab page's order within the tab control unless you do more
programming. Yuck.)
On top of this, tab pages have even more problems. I just abandoned
MS's data binding entirely because it effectively "doesn't work" with
controls that are on tab pages. Of course, it works the way someone
designed it, but again the design is just plain wrong.
Tab pages are tremendously useful. Just beware that when you use them
you are venturing into difficult territory in Windows forms; add a
little padding to your project as soon as the words "tab page" come up.
