How to, not display the tab in a TabControl

  • Thread starter Thread starter roundcrisis
  • Start date Start date
R

roundcrisis

Well basically i need to have a tab control but not show the actual
tabs
how to? there doesnt seem to be any property to do this either in teh
tab control nor in each tab
Cheers
 
What are you trying to do? If you just want to show different controls
at different times (but keeping the others in memory), then perhaps
consider having two overlapping Panel controls and simply toggle the
visibilty of each.

Marc
 
I don't believe there is a way without custom painting the control
(although in WPF it would be quite easy). Honestly, what you have is just a
bunch of panels then, with no way to switch between them.

Which is exactly how I would recommend you do this, place your controls
on a bunch of panels and then make them visible or invisible when needed.
 
Hi,

I do not think that it can be done, you will have to roll your own control.
 
Restrictive in what way? What are you trying to do where you find it
restrictive?

Have you looked at WPF?
 
thanks for ur answers , honestly I find the components for winforms
quite restrictive
is there anything better ?

As Nicholas says, restrictive in what way?

Without the tabs of the TabControl, you'll have to provide your own UI
for switching "tabs". But it's not difficult.

I just answered a very similar question:
http://groups.google.com/group/micr...read/thread/c340677bace859f2/b2aa175913ece042

I

can't guarantee that there's nothing better around than using the .NET
forms API, but it is very flexible. If you're having trouble, it's
more likely that you just haven't learned it well enough than that
there's some fundamental problem.

Yes, when you want to deviate from the standard behavior, you have to
write some extra code. But in my experience it doesn't usually take
much extra code, and that's completely expected in any sort of
framework anyway. Customization is always going to require at least
_some_ extra code; it's not practical for a framework to implement
every possible variation on its behavior.

In your own case, switching between your "tabs" will be as simple as
using the Control.Show() and Control.Hide() methods. How the user will
control depends on your own desire, but even if you want it to be
managed by keyboard shortcuts, that's not difficult. You'll just want
to add an appropriate key handler override to your form (which method
to override will depend on which keys you want to use for controlling
the tabs).

Pete
 
As Nicholas says, restrictive in what way?

Without the tabs of the TabControl, you'll have to provide your own UI
for switching "tabs". But it's not difficult.

I just answered a very similar question:http://groups.google.com/group/microsoft.public.dotnet.languages.csha...

I

can't guarantee that there's nothing better around than using the .NET
forms API, but it is very flexible. If you're having trouble, it's
more likely that you just haven't learned it well enough than that
there's some fundamental problem.

Yes, when you want to deviate from the standard behavior, you have to
write some extra code. But in my experience it doesn't usually take
much extra code, and that's completely expected in any sort of
framework anyway. Customization is always going to require at least
_some_ extra code; it's not practical for a framework to implement
every possible variation on its behavior.

In your own case, switching between your "tabs" will be as simple as
using the Control.Show() and Control.Hide() methods. How the user will
control depends on your own desire, but even if you want it to be
managed by keyboard shortcuts, that's not difficult. You'll just want
to add an appropriate key handler override to your form (which method
to override will depend on which keys you want to use for controlling
the tabs).

Pete

Thanks for your answers, probably my impresion on it been restrictive
(ok, perhaps not the right word) comes from the
fact that I used to use delphi and the componets logic is far more
friendly and intuitive than this,
I m not saying that It can't be done just saying that it requires more
effort and I cant see the benefit of the added complexity
this comment only applies to the components.
Cheers
 
Back
Top