By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,567 Members | 1,670 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,567 IT Pros & Developers. It's quick & easy.

How to disable a Tabpage ?

P: n/a
Hi,
I've a Tabcontrol and I 'd like to disable a tabpage
I try to use the hide and visible property but it doesn't work.
Thx
Stan
Nov 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
you can use tabpage.enabled = false but you can still open the tabpage (all
the controls should be disabled)
dont know if that is enough for you ?

eric

"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:OI**************@tk2msftngp13.phx.gbl...
Hi,
I've a Tabcontrol and I 'd like to disable a tabpage
I try to use the hide and visible property but it doesn't work.
Thx
Stan

Nov 20 '05 #2

P: n/a
On Fri, 31 Oct 2003 11:34:53 -0400, Stan Sainte-Rose wrote:
Hi,
I've a Tabcontrol and I 'd like to disable a tabpage
I try to use the hide and visible property but it doesn't work.
Thx
Stan


The Hide and Visible properties don't work. In order to hide a tab, you
need to keep a hidden tabcontrol and just move the tab pages from one to
the other. It's a pain, but unless it's fixed in Whidbey, I guess we'll
have to live with it.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #3

P: n/a
Mat
USE ADD and remove methods..

"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:1s*****************************@40tude.net...
On Fri, 31 Oct 2003 11:34:53 -0400, Stan Sainte-Rose wrote:
Hi,
I've a Tabcontrol and I 'd like to disable a tabpage
I try to use the hide and visible property but it doesn't work.
Thx
Stan


The Hide and Visible properties don't work. In order to hide a tab, you
need to keep a hidden tabcontrol and just move the tab pages from one to
the other. It's a pain, but unless it's fixed in Whidbey, I guess we'll
have to live with it.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.

Nov 20 '05 #4

P: n/a
On Fri, 31 Oct 2003 20:01:33 +0100, Mat wrote:
USE ADD and remove methods..


Yes, but if you remove a tab page, you've got to store it somewhere, either
in a collection of some sort or, as I said, another tabcontrol.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #5

P: n/a
Chris,
If you use the VS.NET Forms designer to design your form, the tabpage will
be an instance field of the form itself, if the tabpage is an instance field
of the form itself, then the form is 'storing it', why do you feel it needs
to be stuffed into a second tab control?

Even if I was not using the forms designer I would simply have an instance
field to store the tabpage in when I removed it a tab control.

Have you tried the above and are having problems with it?

Hope this helps
Jay

"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:1p******************************@40tude.net.. .
On Fri, 31 Oct 2003 20:01:33 +0100, Mat wrote:
USE ADD and remove methods..

Yes, but if you remove a tab page, you've got to store it somewhere,

either in a collection of some sort or, as I said, another tabcontrol.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.

Nov 20 '05 #6

P: n/a
I thank you very much,
It seems it works fine.. Using the Add and Remove Methods..

Stan

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> a écrit dans le
message de news:ek***************@tk2msftngp13.phx.gbl...
Chris,
If you use the VS.NET Forms designer to design your form, the tabpage will
be an instance field of the form itself, if the tabpage is an instance field of the form itself, then the form is 'storing it', why do you feel it needs to be stuffed into a second tab control?

Even if I was not using the forms designer I would simply have an instance
field to store the tabpage in when I removed it a tab control.

Have you tried the above and are having problems with it?

Hope this helps
Jay

"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:1p******************************@40tude.net.. .
On Fri, 31 Oct 2003 20:01:33 +0100, Mat wrote:
USE ADD and remove methods..


Yes, but if you remove a tab page, you've got to store it somewhere,

either
in a collection of some sort or, as I said, another tabcontrol.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail address.


Nov 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.