Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2005

Tip: Looking for answers? Try searching our database.

Tab control functionality - but with no tabs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob Oldfield - 31 Oct 2005 16:29 GMT
Hi,

I would like to build an app where my main form can take on various
different layouts depending on choices made by the user.  In fact, it would
be very similar to how a tab control works... if user does action a, then
make tab x visible, if action b, then make tab y visible etc.

But I don't want to have the tabs visible.  Any ideas?

(Having Googled for a solution, I'm aware of the options of moving the tabs
to a hidden tab control type solution... but when they come back, they'll
still show up with a tab.  Which I don't want.)
Ken Halter - 31 Oct 2005 17:16 GMT
> Hi,
>
[quoted text clipped - 10 lines]
> to a hidden tab control type solution... but when they come back, they'll
> still show up with a tab.  Which I don't want.)

You can use any container control for this. Basically the same as (in VB6),
dropping a few frames on a form, setting them all Visible = False and
showing only the one that's appropriate for the selected options. This is
basically the same as the Microsoft Windows Common Controls TabStrip
component. That TabStrip is nearly impossible to work with without a set of
frames (or other container controls)... All that TabStrip is, is a
specialized option button (radio button) and exposes a convenient way for a
user to tell the app which frame they want to see. There's zero support for
showing/hiding anything at all when using the TabStrip..... so, that means,
it's easy to do without it <g>

Signature

Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..

Rob Oldfield - 31 Oct 2005 17:46 GMT
Yes.  That's the issue.  I could set up a bunch of frames and make the
relevant one visible as required - but the problem obviously is the general
horribleness of trying to design the UI using that technique.  Thinking
about it in that way, I think the best plan will be to do the design while
using different frames on a tab control.  At runtime, hide the tab controls
and then programatically remove the relevant frame from the tab and make it
visible.

Seems workable, if a bit of a major kludge.

Anyone have anything better?

> > Hi,
> >
[quoted text clipped - 21 lines]
> showing/hiding anything at all when using the TabStrip..... so, that means,
> it's easy to do without it <g>
Herfried K. Wagner [MVP] - 31 Oct 2005 17:57 GMT
"Rob Oldfield" <blah@blah.com> schrieb:
> Yes.  That's the issue.  I could set up a bunch of frames and make the
> relevant one visible as required - but the problem obviously is the
> general
> horribleness of trying to design the UI using that technique.  Thinking
> about it in that way, I think the best plan will be to do the design while
> using different frames on a tab control.

You could create usercontrols for each of the views.  Then each of the views
can be edited in its own designer and you can easily place the usercontrols
on the form.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

Rob Oldfield - 31 Oct 2005 18:43 GMT
> "Rob Oldfield" <blah@blah.com> schrieb:
> > Yes.  That's the issue.  I could set up a bunch of frames and make the
[quoted text clipped - 7 lines]
> can be edited in its own designer and you can easily place the usercontrols
> on the form.

That does sound like a more elegant idea.  I've been playing with the method
I described before and it's not that bad, but I think I shall also try it
your way (I haven't played with user controls in anger before... perhaps now
is the best time to try)

Many thanks to both of you.
Mick Doherty - 31 Oct 2005 18:46 GMT
How about a Tabless TabControl?
See the PanelManager Class on my site:
http://www.dotnetrix.co.uk/custom.html

There are some issues at DesignTime in VS2005 due to some newly introduced
bugs with the CollectionEditor and ReferenceConverter, but it works fine in
VS2003.

In VS2005 it seems to work OK if you build it in it's own solution, but not
if it's a seperate project in the same solution as your app. The downside to
this is that you'll need to distribute a seperate dll, but then if you have
several custom controls they can all be built into the same ControlLibrary.

Signature

Mick Doherty
http://dotnetrix.co.uk/nothing.html

> Hi,
>
[quoted text clipped - 10 lines]
> to a hidden tab control type solution... but when they come back, they'll
> still show up with a tab.  Which I don't want.)
Rob Oldfield - 31 Oct 2005 19:23 GMT
Can't see any reference to a PanelManager class.  You're talking about
TabControlEx?

> How about a Tabless TabControl?
> See the PanelManager Class on my site:
[quoted text clipped - 23 lines]
> > to a hidden tab control type solution... but when they come back, they'll
> > still show up with a tab.  Which I don't want.)
Mick Doherty - 31 Oct 2005 19:33 GMT
No.
The PanelManager source can be found on my "Tips --> Custom Controls" page.

Signature

Mick Doherty
http://dotnetrix.co.uk/nothing.html

> Can't see any reference to a PanelManager class.  You're talking about
> TabControlEx?
[quoted text clipped - 38 lines]
> they'll
>> > still show up with a tab.  Which I don't want.)
Rob Oldfield - 31 Oct 2005 20:01 GMT
Missed that one.  I'll be trying that as well (and probably the MenuSkinner
as well).

Thanks.

> No.
> The PanelManager source can be found on my "Tips --> Custom Controls" page.
[quoted text clipped - 41 lines]
> > they'll
> >> > still show up with a tab.  Which I don't want.)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.