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 / December 2005

Tip: Looking for answers? Try searching our database.

hide the tab of tabpage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Esmail Bonakarian - 26 Dec 2005 17:03 GMT
Hello all,

I have a tabcontrol with 3 tabpages. I want to
hide (not just disable) the 3 actual selection tabs that
allow a user to select a given tab page, but keep the
page around and active.

Instead I will be changing the current tabpage shown
programmatically.

I haven't found a way to do this, but I don't know
that much about windows forms (yet ;-)

I am currently implementing this behavior with the
use of one form and 3 panels, however someone suggested
the use of a TabControl, which is nice and gives me most
of the functionality I need, but unless I can get rid
of (ie make invisible) the actual selection tabs I'll
have to stick to my 1 Form + 3 Panels idea.

.. is it possible to hide just the selection tab of
a tab page?

thanks,
Esmail
Tim_Mac - 28 Dec 2005 23:04 GMT
hi esmail
i used to do something similar, and i would move the tab control off the top
of the form, or else hide it behind another control, so the tab selectors
would not be visible, but the actual content pane for each tab page are
visible.  then you control the current tab programatically as you have
suggested.  i was using this to make a kind of wizard control, but there are
great free wizard controls out there if this is what you are using it for.

tim

--------------------------
blog: http://tim.mackey.ie 
Esmail Bonakarian - 29 Dec 2005 01:28 GMT
hello!

> i used to do something similar, and i would move the tab control off the top
> of the form,

I hadn't though of that  .. I just tried in the designer, it wouldn't
allow me to do so, so you must have coded it to do that right?

> or else hide it behind another control, so the tab selectors
> would not be visible, but the actual content pane for each tab page are
> visible.

tried that just now too, and that works ... I'll have to remember that
technique.

> then you control the current tab programatically as you have
> suggested.  i was using this to make a kind of wizard control, but there are
> great free wizard controls out there if this is what you are using it for.

what are wizard controls? I think at this point I have the "one form,
several panels" approach working, but still curious.

Thanks,
Esmail
Tim_Mac - 29 Dec 2005 09:54 GMT
hi Esmail,
the best wizard control i know of is on codeproject, written by Al Gardner:
http://www.codeproject.com/cs/miscctrl/DesignTimeWizard.asp

a wizard control is used when you have a sequence of steps to perform, and
you want to display some user interface components at each step.  i use one
when i am loading up my windows forms content management system, first
page/tab is for login, then another for checking passwords, downloading
data, running integrity check etc.
it has built-in Next/Previous buttons and you can control it all
programatically if you want to.  it's very good.

i think it is a valuable control to have available to you if you write
windows forms applications.

tim

--------------------------
blog: http://tim.mackey.ie

> hello!
>
[quoted text clipped - 19 lines]
> Thanks,
> Esmail
Mick Doherty - 29 Dec 2005 12:00 GMT
I wrote a PanelManager Class specifically for this. If you want to use it in
VS2005 then you'll have to build and compile the control in a seperate
solution, as there are design time bugs with CollectionEditors in VS2005
that make it harder to work with than just stacked panels when the class is
included in the solution (even if in a seperate project). MS are currently
working on a solution to this bug.

You can see the code on my site:
http://www.dotnetrix.co.uk/custom.html

Signature

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

> Hello all,
>
[quoted text clipped - 21 lines]
> thanks,
> Esmail
Esmail Bonakarian - 29 Dec 2005 23:43 GMT
> I wrote a PanelManager Class specifically for this. If you want to use it in
> VS2005 then you'll have to build and compile the control in a seperate
[quoted text clipped - 5 lines]
> You can see the code on my site:
> http://www.dotnetrix.co.uk/custom.html

Hello there,

Thanks for the pointer/link.

I went to your the site, copied the C# code, and dumped it
into a PanelManger.cs file in my project directory, and it compiled
fine and it shows up nicely in the solution explorer.

I also added a reference to System.Design .. should I
expect this control now to show up in the toolbox? No
such luck yet.

I feel I am missing a simple step or two, could you
tell me what I need to do to make the control available?

As someone who has coded primarily under Linux w/ emacs
and gcc/g++ I am still a bit bewildered by all the various
files that get "automagically" generated by VS.NET

I like the VS environment, but it's taking some time to
get used to all of its features.

Thanks,

Esmail
ps: your site looks interesting, I'm going to poke around
    there some more.
Mick Doherty - 30 Dec 2005 12:13 GMT
> Hello there,
>
[quoted text clipped - 23 lines]
> ps: your site looks interesting, I'm going to poke around
>     there some more.

You'll need to right click on the toolbox and select Add items... then
browse to the exe file of your app and select it.

Alternatively, you can take advantage of the automagical adding of
usercontrols to the toolbox, just comment out the code, leaving just the
namespace and class, and then change inheritance from Control to
UserControl. Open and close the Control Designer and change everything back,
then rebuild. The PanelManager Control will now be in the 'My UserControls'
toolbox. Note: this only works pre 2005.

Signature

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

Esmail Bonakarian - 31 Dec 2005 00:13 GMT
> Alternatively, you can take advantage of the automagical adding of
> usercontrols to the toolbox, just comment out the code, leaving just the
> namespace and class, and then change inheritance from Control to
> UserControl. Open and close the Control Designer and change everything back,
> then rebuild. The PanelManager Control will now be in the 'My UserControls'
> toolbox. Note: this only works pre 2005.

Very cool .. thanks!!

(I'm still using VS 2003/.NET 1.1 .. though I recently downloaded the
freebie version of VS 2005 C# Express).

Happy New Year.

Esmail
Tim_Mac - 29 Dec 2005 18:00 GMT
if you have comments on the wizard control, ask the auther on codeproject
via the 'comments' at the bottom of the page.
also, please only reply to the newsgroups.
Esmail Bonakarian - 29 Dec 2005 18:48 GMT
> if you have comments on the wizard control, ask the auther on codeproject
> via the 'comments' at the bottom of the page.
> also, please only reply to the newsgroups.

fair enough, thanks!

Esmail

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.