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

Is there a way to either disable or hide tab pages??

Siv
Hi,
I have a form with a TabControl on it, I have 6 tabs across the top of the
page. What I'd like to do is have all but the first and second tab visible
when the app starts and then as the user completes the data on the first tab
and clicks to the second tab, the third tab appears. What I am trying to
avoid is the user not jumping to the next but one tab as each tab determines
the contents of the one that follows it.

In the properties for the tabpages there are properties like hide and show
but they just don't appear to have any effect when running the app?

Anyone know the answer?

--
Siv
Martley, Near Worcester, UK.
Nov 21 '05 #1
6 2162
Hi,

Here is some code for a tab control which has a tab page change
event. If the tab page is no enabled you can cancel the change to the page.

http://www.windowsformsdatagridhelp....3-f5a4dd0afac4

There is no way to hide or show a tab page. You must add or
remove the page from the tab page collection to hide or show it.

Ken
---------------
"Siv" <ms**********@removeme.sivill.com> wrote in message
news:ua**************@TK2MSFTNGP14.phx.gbl...
Hi,
I have a form with a TabControl on it, I have 6 tabs across the top of the
page. What I'd like to do is have all but the first and second tab
visible when the app starts and then as the user completes the data on the
first tab and clicks to the second tab, the third tab appears. What I am
trying to avoid is the user not jumping to the next but one tab as each
tab determines the contents of the one that follows it.

In the properties for the tabpages there are properties like hide and show
but they just don't appear to have any effect when running the app?

Anyone know the answer?

--
Siv
Martley, Near Worcester, UK.

Nov 21 '05 #2
As Ken said, the only thing you can do is either Add or Remove the Tabpage(s). You can put code to add the additional
tabpage(s) in the current tab's Click Event( TabControl1.TabPages.Add(Tab1) ) and if you need to remove
tabpages(TabControl1.TabPages.Remove(Tab1) ), you can use a Select Case construct to decide to remove Tabpages. One thing to
watch for is if the user clicks more than one time on the Tabpage in question as it will continue to add TabPages. So, you need
to keep a count and not allow more than those you want to be added or removed.
james

"Siv" <ms**********@removeme.sivill.com> wrote in message news:ua**************@TK2MSFTNGP14.phx.gbl...
Hi,
I have a form with a TabControl on it, I have 6 tabs across the top of the page. What I'd like to do is have all but the
first and second tab visible when the app starts and then as the user completes the data on the first tab and clicks to the
second tab, the third tab appears. What I am trying to avoid is the user not jumping to the next but one tab as each tab
determines the contents of the one that follows it.

In the properties for the tabpages there are properties like hide and show but they just don't appear to have any effect when
running the app?

Anyone know the answer?

--
Siv
Martley, Near Worcester, UK.

Nov 21 '05 #3
"Siv" <ms**********@removeme.sivill.com> schrieb:
I have a form with a TabControl on it, I have 6 tabs across the top of the
page. What I'd like to do is have all but the first and second tab
visible when the app starts and then as the user completes the data on the
first tab and clicks to the second tab, the third tab appears. What I am
trying to avoid is the user not jumping to the next but one tab as each
tab determines the contents of the one that follows it.


<URL:http://dotnetrix.co.uk/tabcontrols.html>
-> "Hide and Show Tabpages in a Tabcontrol."

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
Siv
Guys,
Many thanks for your replies and useful links, I can see I am going to have
my work cut out!
One thing I am not sure about (before having read the links you kindly
pointed me to) is the issue that I have designed the contents of the tab
pages in advance, if I remove them and the re-add them can I use the ones
that are already designed, or must I effectively populate them
programmatically.

Could I create a tabcontrol that I don't use on screen and then selectively
copy the pages as needed from this into the one on screen.
I suppose what I am asking is what would be the group's best advice??

--
Siv
Martley, Near Worcester, UK.
"Siv" <ms**********@removeme.sivill.com> wrote in message
news:ua**************@TK2MSFTNGP14.phx.gbl...
Hi,
I have a form with a TabControl on it, I have 6 tabs across the top of the
page. What I'd like to do is have all but the first and second tab
visible when the app starts and then as the user completes the data on the
first tab and clicks to the second tab, the third tab appears. What I am
trying to avoid is the user not jumping to the next but one tab as each
tab determines the contents of the one that follows it.

In the properties for the tabpages there are properties like hide and show
but they just don't appear to have any effect when running the app?

Anyone know the answer?

--
Siv
Martley, Near Worcester, UK.

Nov 21 '05 #5

"Siv" <ms**********@removeme.sivill.com> wrote in message news:eH**************@TK2MSFTNGP14.phx.gbl...
Guys,
Many thanks for your replies and useful links, I can see I am going to have my work cut out!
One thing I am not sure about (before having read the links you kindly pointed me to) is the issue that I have designed the
contents of the tab pages in advance, if I remove them and the re-add them can I use the ones that are already designed, or
must I effectively populate them programmatically.

Could I create a tabcontrol that I don't use on screen and then selectively copy the pages as needed from this into the one on
screen.
I suppose what I am asking is what would be the group's best advice??

--
Siv
Martley, Near Worcester, UK.


After designing your TabPages, with all the controls on each one ( Buttons, textboxes etc.) in the Form Designer, your Tabpages
will continue to contain all the different controls that you originally put on them
when added or removed. You will not have to recreate them during add/remove. And if you have data, (depending on how you
populate your controls......Textboxes for example) it too should remain until you do something to change it.
james

Nov 21 '05 #6
Siv
James,
Thanks for this, I have copied the very useful code from the dotnetrix.co.uk
site (http://dotnetrix.co.uk/tabcontrols.html) and modified it to my own
construction and I tried what you said. It does work all my tabs re-appear
with their original controls still on them. Brilliant thanks to you and the
other guys that pitched in.
--
Siv
Martley, Near Worcester, UK.
"james" <jjames700ReMoVeMe at earthlink dot net> wrote in message
news:uI**************@TK2MSFTNGP10.phx.gbl...

"Siv" <ms**********@removeme.sivill.com> wrote in message
news:eH**************@TK2MSFTNGP14.phx.gbl...
Guys,
Many thanks for your replies and useful links, I can see I am going to
have my work cut out!
One thing I am not sure about (before having read the links you kindly
pointed me to) is the issue that I have designed the contents of the tab
pages in advance, if I remove them and the re-add them can I use the ones
that are already designed, or must I effectively populate them
programmatically.

Could I create a tabcontrol that I don't use on screen and then
selectively copy the pages as needed from this into the one on screen.
I suppose what I am asking is what would be the group's best advice??

--
Siv
Martley, Near Worcester, UK.


After designing your TabPages, with all the controls on each one (
Buttons, textboxes etc.) in the Form Designer, your Tabpages will continue
to contain all the different controls that you originally put on them
when added or removed. You will not have to recreate them during
add/remove. And if you have data, (depending on how you populate your
controls......Textboxes for example) it too should remain until you do
something to change it.
james

Nov 21 '05 #7

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

Similar topics

32
by: Mark Johnson | last post by:
You have an, a, anchor with href link. Can you use a stylesheet to effectively disable the link, so that you can't click on it; that it will appear simply as text?
29
by: lori3laz | last post by:
How do you disable the right click>view source option on web pages so people can't view your coding and copy it? What's the html I need to include in my website to utilize this feature? Thank...
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...
6
by: PerryC | last post by:
I have search googles and there are hundreds of tips about AllowByPassKey... however, none works for me... well, perhaps I am too new to such high level functionality that it just does not make...
6
by: Raghu Raman | last post by:
Hi, we are doing an in house project in c#.net(asp.net).We wanted to close our application when ever the user presses the SIGNOUT button. Even though we programtically disconnects them from the...
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...
8
by: alamodgal | last post by:
hiiiiiiiiiii everybody, pls solve my problem if u can? Actualy what happens in my site when i press enter key it will show some secured...
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:
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: 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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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.