469,291 Members | 1,814 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,291 developers. It's quick & easy.

How do you disable a Tab Page within a Tab Control?

Hello all,
Can anybody give me any ideas on how to disable a tab page within a tab
control.

I have a tab control tabClients with 3 pages. I would like to disable pages
2 & 3 when a certain condition is met.

Thanks in Advance.
Phil.
Jul 21 '05 #1
4 11460
On Tue, 19 Apr 2005 18:15:15 +1200, Phil wrote:
Hello all,
Can anybody give me any ideas on how to disable a tab page within a tab
control.

I have a tab control tabClients with 3 pages. I would like to disable pages
2 & 3 when a certain condition is met.

Thanks in Advance.
Phil.


You can't. What you can do is remove them from the TabControl and add them
again as soon as your condition changes.
--
Claudio Grazioli
http://www.grazioli.ch
http://www.grazioli.ch/HommingbergerGepardenforelle/
Jul 21 '05 #2
....that's not strictly true. You can disable a tabpage but, it does not stop
you selecting it, it just stops you interacting with any of its controls.
However, as you say, it is standard practice to remove and reinsert tabpages
as their access level changes.

If you can use a free third party tabcontrol then take a look at
TabControlEX which does allow you to disable tabpages as well as a few other
things you can't usually do.
http://dotnetrix.co.uk/controls.html

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Claudio Grazioli" <ne********@gmx-ist-cool.de> wrote in message
news:1g******************************@40tude.net.. .
On Tue, 19 Apr 2005 18:15:15 +1200, Phil wrote:
Hello all,
Can anybody give me any ideas on how to disable a tab page within a tab
control.

I have a tab control tabClients with 3 pages. I would like to disable
pages
2 & 3 when a certain condition is met.

Thanks in Advance.
Phil.


You can't. What you can do is remove them from the TabControl and add them
again as soon as your condition changes.
--
Claudio Grazioli
http://www.grazioli.ch
http://www.grazioli.ch/HommingbergerGepardenforelle/

Jul 21 '05 #3
> If you can use a free third party tabcontrol then take a look at
TabControlEX which does allow you to disable tabpages as well as a few
other things you can't usually do.
http://dotnetrix.co.uk/controls.html


oops, I'm contradicting myself. I meant disable tabpage selection, not
disable tabpages.

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

Jul 21 '05 #4
Thanks for your replies,
I will try adding the tabs and removing them as you suggest.

Phil.

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:uX*************@TK2MSFTNGP15.phx.gbl...
If you can use a free third party tabcontrol then take a look at
TabControlEX which does allow you to disable tabpages as well as a few
other things you can't usually do.
http://dotnetrix.co.uk/controls.html


oops, I'm contradicting myself. I meant disable tabpage selection, not
disable tabpages.

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

Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Robert Ladd | last post: by
9 posts views Thread by junlia | last post: by
6 posts views Thread by | last post: by
2 posts views Thread by rn5a | last post: by
1 post views Thread by Webmills | last post: by
4 posts views Thread by =?Utf-8?B?TUNN?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.