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

Show/Hide tab page in TabStrip control

364 views
Skip to first unread message

its_...@hotmail.com

unread,
Nov 24, 2005, 2:29:36 AM11/24/05
to
We are developing an application in VB6. We have used TabStrip control
to display multiple tab pages with different information. We need to
either enable/disable or show/hide a tab page for certain conditions,
which appears to be impossible with TabStrip control.

Has someone achieved this with TabStrip control (i.e. show/hide or
enable/disable a specific tab page)? We don't want to use SSTab control
that provides this feature, because it would change the look and feel
of this application from other application that have been developed by
using TabStrip control.

Any help will be highly appreciated.

Regards,

Gsox

its_...@hotmail.com

unread,
Nov 24, 2005, 2:30:08 AM11/24/05
to

Jack Russell

unread,
Nov 24, 2005, 2:42:40 AM11/24/05
to
The way I did it in .net was to delete any "hidden" Tab pages.

Seems to work well

Frank Adam

unread,
Nov 24, 2005, 3:03:35 AM11/24/05
to

Just use a tabstrip and put your "pages" in a frame array.
Bit of cut and pasting, but not too painful.

Then..when the strip is clicked.
for i = frames.lbound to frames.ubound
frames(i).visible = i = tabstrip1.tabindex
next

In fact, usually, i just use an array of buttons. Or option buttons in
graphical mode in a frame, which makes them look like a series of
buttons, but will act as option buttons do(deselecting on selection).
Looks almost like a tabstrip. It does involve a bit of extra coding
for when the form resizes, but if i can do away with the damn commdlg
control i'm all in for a few extra lines of code..

--

Regards, Frank

J French

unread,
Nov 24, 2005, 5:04:39 AM11/24/05
to

Further to Frank's suggestion

- I also detest OCXes, but like Tabs
- my solution is to simulate a Tabstrip in a Usercontrol

www.jerryfrench.co.uk/etabsim.htm

Mark Yudkin

unread,
Nov 27, 2005, 12:24:08 PM11/27/05
to
The TabStrip consists of a collection of Tab objects (TabStrip.Tabs). You
can use the normal methods you use for all collections (Add, Remove, etc) to
make any colletion you want. For further information, review the
documentation.

<its_...@hotmail.com> wrote in message
news:1132817376.7...@o13g2000cwo.googlegroups.com...

Ken Halter

unread,
Nov 28, 2005, 10:15:11 AM11/28/05
to
<its_...@hotmail.com> wrote in message
news:1132817376.7...@o13g2000cwo.googlegroups.com...
>
> Has someone achieved this with TabStrip control (i.e. show/hide or
> enable/disable a specific tab page)? We don't want to use SSTab control
> that provides this feature, because it would change the look and feel
> of this application from other application that have been developed by
> using TabStrip control.
>
> Any help will be highly appreciated.
>
> Regards,
>
> Gsox

Adding to the pile (btw BUGS is not an appropriate crosspost for this type
of question), the SSTab can be made to look quite a bit like a TabStrip by
setting its Style property to 1 (ssStylePropertyPage). It doesn't support XP
Themes though.

SSTab1.Style = ssStylePropertyPage

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..


0 new messages