473,395 Members | 1,530 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,395 software developers and data experts.

disable tab in TabControl

How do I disable a TabPage(s) in a TabControl?
Thank you
Nov 16 '05 #1
5 22162
Hi Alex,

This article on MSDN should expain what you need to know:
http://msdn.microsoft.com/library/de...mmatically.asp

Hope this helps,
- Glen

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
How do I disable a TabPage(s) in a TabControl?
Thank you

Nov 16 '05 #2
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
How do I disable a TabPage(s) in a TabControl?


myTabControl.TabPages[n].Enabled = false;

--
Truth,
James Curran
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
(note new day job!)
Nov 16 '05 #3
I wish I could do that. But TabPage does not have Enabled property.
"James Curran" wrote:
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
How do I disable a TabPage(s) in a TabControl?


myTabControl.TabPages[n].Enabled = false;

--
Truth,
James Curran
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
(note new day job!)

Nov 16 '05 #4
You're right, I found the property.
But it does not prevent user from clicking on the tab. I want the tab to be
disabled completely, so even tab's label would be grayed out.

Thanks

"James Curran" wrote:
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
How do I disable a TabPage(s) in a TabControl?


myTabControl.TabPages[n].Enabled = false;

--
Truth,
James Curran
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
(note new day job!)

Nov 16 '05 #5
vicke
1
I found it a little bit distrubing that I couldn't disable a tabpage. But I found another solution. Deleting it :P


tabControl1.TabPages.Clear();

switch (id)
{
case 0:
tabControl1.TabPages.Add(tabPage1);
break;
// ... some more tabs...
default: tabControl1.TabPages.Add(tabPage2);
break;
}

It works fine for me...

=)
Apr 21 '06 #6

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

Similar topics

2
by: John Spiegel | last post by:
Hey all, Is it possible to disable individual tabs of a TabControl? Also, can the tabs be turned off? Basically, I'm building a <gulp> wizard form and would like to use a TabControl to...
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...
3
by: ASGMikeG | last post by:
Hi, I'm upgrading an application from VB6 to .NET. It used tab controls in VB6 to achieve a tab dialogue / wizard type effect - navigating from one tab to the next as the user filled in...
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: Stan Sainte-Rose | last post by:
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
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...
2
by: RichG | last post by:
With the help of Cor Ligthert in a pryor post I was able to make this sub: Public Sub disableControls(ByVal frm As Form) 'this is to create a read only form that has active buttons Dim x As...
1
by: =?Utf-8?B?QWxleCBLLg==?= | last post by:
Hi all In a Visual Studio 2005 C# project, I have a simplest tabcontrol with two tabpages. When I set tab control's Alignment property to Right, tab texts (captions) disappear. Does anybody...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.