473,480 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

tabcontrol - cannot disable or hide tab pages

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 information.

When this has upgraded to .NET the user can suddenly click on the other tabs
without having completed the previous tabs i.e. the other tabs are not
disabled - only the controls on them are.

How do I disable and/or hide a tab page so that the user cannot navigate to
them by clicking on the tab ?

Regards
Michael
Nov 1 '05 #1
3 23015
You can't hide a tab anymore. You have to remove it from the tabpages
collection and readd it later. Real PITA.

http://www.ftponline.com/vsm/2004_09...a/default.aspx

May I suggest a much better way...

http://www.actiprosoftware.com/Produ...d/Default.aspx

Greg
What you have to do is
"ASGMikeG" <AS******@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
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 information.

When this has upgraded to .NET the user can suddenly click on the other
tabs
without having completed the previous tabs i.e. the other tabs are not
disabled - only the controls on them are.

How do I disable and/or hide a tab page so that the user cannot navigate
to
them by clicking on the tab ?

Regards
Michael

Nov 1 '05 #2
TabControlEX allows you to disable tabs:
http://www.dotnetrix.co.uk/controls.html

....but it sounds like you should be using a Wizard Control:
http://www.codeproject.com/cs/miscctrl/SampleWizard.asp

or maybe a Tabless TabControl plus Next and Previous Buttons:
http://www.dotnetrix.co.uk/custom.html --> Create a PanelManager
(this class has designtime problems in VS2005).

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"ASGMikeG" <AS******@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
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 information.

When this has upgraded to .NET the user can suddenly click on the other
tabs
without having completed the previous tabs i.e. the other tabs are not
disabled - only the controls on them are.

How do I disable and/or hide a tab page so that the user cannot navigate
to
them by clicking on the tab ?

Regards
Michael

Nov 1 '05 #3
owslachief
1 New Member
I created a copy of both the tab control and it's child tab pages collection. I removed the last two pages (the ones I wanted to "hide") from the collection, removed the original tab control, and added the new tab control with the "mini" version.


Dim MiniTab As System.Windows.Forms.TabControl
MiniTab = tabBenefits
Dim colTabs As New
System.Windows.Forms.TabControl.TabPageCollection( MiniTab)
colTabs = MiniTab.TabPages
colTabs.Remove(MiniTab.TabPages(MiniTab.TabPages.C ount - 1))
colTabs.Remove(MiniTab.TabPages(MiniTab.TabPages.C ount - 1))
Controls.Remove(tabBenefits)
Controls.Add(MiniTab)
Apr 6 '06 #4

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

Similar topics

1
1239
by: genc ymeri | last post by:
Hi, I'm running in a strange "problem" .... I'm trying to hide a page in tabcontrol with this command " tabMyPage.Hide();" but it still shows up. Am I missing something ??
0
1143
by: Colin | last post by:
Hey all, I'm having a bit of an issue with the TabControl (1.0.5000.0) under Visual Studio .NET 2003... Was wondering if anyone had seen it before... Basically, I have drawn a TabControl, and...
2
2337
by: Francois Vanderseypen | last post by:
Can someone tell me why you cannot drag something onto a tabcontrol with zero tabpages? I have a kind of 'docking' interface and relies heavily on GDI+, a screenshot is available here: ...
5
9143
by: Mike Fellows | last post by:
I have a TabControl (TabControl1) containing 3 TabPage's (TabPage1, TabPage2 and TabPage3) under certain circumstances i need to make some of these tab pages invisible ive tried...
2
999
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
1671
by: Kevin | last post by:
Although lots of people described how to workaround the lack of ability to hide and show tab pages on a tab control, I couldnt find a code example so I made one. Create a class that inherits from...
3
1921
by: ohmmega | last post by:
since its common knowledge that it's not possible to hide a tabcontrol tab, i made a collection for removed pages including their tabcontrols. removing works pretty fine, but whenever i try to add...
2
6246
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
6908
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
7081
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
6921
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...
0
5336
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
4776
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
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
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 ...

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.