For tabPage
Hide(); -- doesn't hide
Visible = false; -- can still see it.
For TabControl
TabControl.TabPages[ai].Hide(); -- doesn't hide
The only way I have been able to do this is to call
TabControl.TabPages.Remmove(TabPage); or RemoveAt[ai];
but even RemoveAt[ai] stops doing the correct thing after a while so I had
to resort to using Remove(TabPage) exclusively.
Using Remove() I have to write a whole lot of Hack code to add the removed
tab page back into the correct position when I want to see it again.
I actually did this a while back, got around the fact that Hide() doesn't
work, and Visible = false doesn't work, and then forgot about it. (Except
for the annoying flciker...)
Now, I am finding that by removing that TabPage, the bindings for control on
the TabControl don't work!!! When I re-add that TabPage, the bindings work
again. Maybe this is just coincidence, but it reminded me to ask why its so
freakin' hard to hide a tabPage in the first place? Arrrggghh!!!
Wayne.
Regards,
"Wayne Hartell" <wh...@haestad.com> wrote in message
news:uxhSwnVO...@TK2MSFTNGP12.phx.gbl...
"Wayne Hartell" <wh...@haestad.com> schrieb:
> This has got to be asked over 100 times, but is there any easy
> way of doing this?
>
> For tabPage
> Hide(); -- doesn't hide
> Visible = false; -- can still see it.
No, there is no easy way except using an other control. Have a look at
the tabs included in the Magic Library (http://www.dotnetmagic.com/).
Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
As much as I love C#, it sucks for the millions of bugs that have slowed my
developement ....
Fix the damn Datagrid & Databinding...!!!
or should we switch to Java ?
learn something from Access/VB ....those kindda suck too ... but they are
soo easy to use ....it takes 1/10th of the time to do the same thing in
access .... and no I am not an amateur ....I am good at C#/C++ ... but paid
bugs are a drag? sheeeet ....
"Carlos H. Perez" <carlosha...@earthlink.net> wrote in message
news:u$s%236XWOD...@TK2MSFTNGP12.phx.gbl...