Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to make a tabPage in the tabControl invisible?

1 view
Skip to first unread message

Wayne Hartell

unread,
Jun 23, 2003, 7:34:51 AM6/23/03
to
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.

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.


Carlos H. Perez

unread,
Jun 23, 2003, 9:00:54 AM6/23/03
to

The main problem of the TabControl in the .NET framework is that it is a
wrapper of the Tab control in the Common Control Library, as a consequence
it has the same virtues and the same annoyances --like for example the
jumping of the active row from the top to the bottom than the "native"
control. And yes, the only way to do what you want to achieve is by using
the horribly and unfriendly method of removing and adding tabs. That's
what Microsfot gives you --I wanted to say for free, but it is not free, we
do pay for the Visual Studio .NET IDE.

Regards,


"Wayne Hartell" <wh...@haestad.com> wrote in message
news:uxhSwnVO...@TK2MSFTNGP12.phx.gbl...

Herfried K. Wagner

unread,
Jun 23, 2003, 12:01:59 PM6/23/03
to
Hello,

"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


Shardool Karnik

unread,
Jun 23, 2003, 3:20:44 PM6/23/03
to
Damn ! I never thought about this ....
We pay for this buggy piece of crap...

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...

0 new messages