473,382 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to disable a Tabpage ?

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
6 14470
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Giulio Mastrosanti | last post by:
How can I disable accessing other tabpages of a tabcontrol while performin a long task on a specific tabpage? I can't find an 'enabled' property in the tabpage properties... Thanx, Giulio
4
by: Phil | last post by:
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...
1
by: Tony | last post by:
Hi I'm using a TabControl and need to disable a tabpage such that, although it is visible, it cannot be selected or viewed in anyway. The text of the tab i guess should be "greyed out". Any...
2
by: Sumit | last post by:
Hi All, I am working on an application in which i have 4 tabpages say A, B, C & D. Now in one scenario i want that user is able to click on tabs A & B but the tabs C & D remain disabled for...
2
by: tottigang | last post by:
Hi, I have a tabstrip and I have some tabs in it. On the first page, all the tabs are enabled, I need to disbale part of the tabs at a specific point in the application and again enable them. I...
6
by: pmcguire | last post by:
I would like to disable a TabPage control so that my users can see that the page exists, but the selected index of the TabControl won't change if they click on the tab for it. Ideally, the TabPage's...
4
by: emferrari | last post by:
Hi I have a program with a tabControl which contains 6 tabs. During the execution of the program I want to Enable/Disable some of the tabs but I did not find any way to do that. I've tried to...
5
by: Amit | last post by:
Can anyone write the code to hide tabpage of tab control in windows form 2.0 Thanks, Amit
2
by: Claudia Fong | last post by:
Hi, I added a tabcontrol in a panel in my form. My tabcontrol have more than 3 pages.. each page contains textboxes, combobox, checkbox. I want to disable the items of each of the page of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.