473,499 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make one TabPage of a TabControl invisible ?

Hi,

A TabControl may have several TabPages. I want to set one page to be
invisible.
So I called: TabPageX.Visible=false or TabPageX.Hide , but nothing happens.
Then I called TabPageX.Dispose,this time the page is invisible. But I can't
restore the tabpage any more.

Any response will be appreciated,

Peter

Nov 21 '05 #1
5 20793
Peter,

The site from Mick Doherty, which is in my opinion the best for the
tabcontrol

http://dotnetrix.co.uk/tabcontrols.html

I hope this helps,

Cor
Nov 21 '05 #2
Hi,

In case you did not want to try the tab control Cor refered to. You
need to remove the tabpage from the tab control to hide it and add it back in
to show it.

Ken
------------------------

"Peter" wrote:
Hi,

A TabControl may have several TabPages. I want to set one page to be
invisible.
So I called: TabPageX.Visible=false or TabPageX.Hide , but nothing happens.
Then I called TabPageX.Dispose,this time the page is invisible. But I can't
restore the tabpage any more.

Any response will be appreciated,

Peter

Nov 21 '05 #3

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:eV**************@tk2msftngp13.phx.gbl...
Peter,

The site from Mick Doherty, which is in my opinion the best for the
tabcontrol

http://dotnetrix.co.uk/tabcontrols.html

I hope this helps,

Cor


In my opinion too ;-)

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

Nov 21 '05 #4
Hi Ken,

Cor didn't refer to my TabControlEX, but my tabcontrol tips page, where
you'll find examples to show how to do a lot of things that are frequently
asked for, such as methods to hide and show tabpages.

Obviously, TabControlEX wraps up most of my tips and more, but some people
don't want to use third party controls (even free ones) when they can code
it themselves.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
Nov 21 '05 #5
Mick Doherty's code is excellent!

Thank you all.

Peter
Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2003
by: meh | last post by:
New to C#... I have a tab page with a handful of controls on it (label, combobox, etc.). Is it possible to "boilerplate a tabPage with the controls "like a MDI childForm" so that adding a new...
2
3600
by: Fei Li | last post by:
tabpage hide() and show() do not work tabpage properties Enabled and Visible are able to be set but not work and not documented. Why?
4
1864
by: Sumit | last post by:
Hi all, I am working on an application in which there is a form which has a tabcontrol containing 4 tab pages. Let the name of the tabpages be A,B,C&D. The default view is that there are all...
1
7633
by: RA | last post by:
Hi 1) I want to create a TabPage class in design mode - how do I do it? What type of project should I use? Is it going to be a custom control? 2) I have a TabControl that I would like to add to...
3
3465
by: Cynthia | last post by:
I knew that "Hide" doesn't work with Tabpage if I want to hide it. I should use Remove/Add. But I have some other controls in the tabpage which I don't want to use code to dynamiclly create them....
8
7517
by: Kejpa | last post by:
Hey there! I have a tabcontrol on one of my forms. Some of the tab should not be accessable (and thus invisible) until you give the correct password. But I can't hide the tab......
2
2831
by: Rex the Strange | last post by:
I suspect the answer to this question is "you can't," but here goes anyway: I have a tabcontrol which contains, of course, various tabpages (added programmatically at runtime, but this is...
2
14298
by: John Wright | last post by:
I have the following routine I use to check for a certain tab page. I want to enable this tab page only on the tab control and set the focus. However, I cannot get the tab to set focus no matter...
6
4553
by: ray well | last post by:
i want a user to be able to change tab pages thru the keyboard, i tried entering the TabPage.text as '&1 Names', "&2 Addresses', etc., so that the user can change pages by type ALT 1, ALT 2, on the...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7178
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.