473,387 Members | 3,787 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,387 software developers and data experts.

Working with tabcontrol and tabpage

I have a tabcontrol that has several attached tabpage's. Not all of the
tabpages should be accessible at all times. Ideally I'd like to do one of
the following:

- hide those tab pages that should not currently be accessible

OR

- change the font on the tab for the tabpages that are disabled (like gray
them out or something) as a means of user feedback that they're inactive

The problem is that none of this appears possible. Sure, I can catch the
click event on the "disabled" tabs but I want some visual indicator that
they are not currently enabled. Makes sense, right? Anybody come across
this? This seems like pretty basic functionality.

FYI - the Hide(), Visible, and Enabled methods/properties do not satisfy
this requirement. They work, but as it says in MSDN, this poor behavior was
"by design". Why doesn't that line work for me?


Nov 16 '05 #1
2 6620
In order to show / hide tabpages, you must Remove them from the
TabControl and Add them back in.

There are some examples in this group of how to handle the Paint event
yourself for the tab pages in order to change fonts / colour on the
tabs themselves.

This is one of the areas in which the "by design" behaviour of TabPages
is inadequate. Another is the inability to "highlight" the tab text
when there is an ErrorProvider flashing on another page, so there is an
error that the user can't see. In short, TabPages need help; I hope
that they improve in some future version.

Nov 16 '05 #2
http://dotnetrix.co.uk/tabcontrols.html

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Ed Debrot" <de****@addsys.com> wrote in message
news:eP****************@TK2MSFTNGP15.phx.gbl...
I have a tabcontrol that has several attached tabpage's. Not all of the
tabpages should be accessible at all times. Ideally I'd like to do one of
the following:

- hide those tab pages that should not currently be accessible

OR

- change the font on the tab for the tabpages that are disabled (like gray
them out or something) as a means of user feedback that they're inactive

The problem is that none of this appears possible. Sure, I can catch the
click event on the "disabled" tabs but I want some visual indicator that
they are not currently enabled. Makes sense, right? Anybody come across
this? This seems like pretty basic functionality.

FYI - the Hide(), Visible, and Enabled methods/properties do not satisfy
this requirement. They work, but as it says in MSDN, this poor behavior
was
"by design". Why doesn't that line work for me?

Nov 16 '05 #3

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

Similar topics

5
by: Tamir Khason | last post by:
How be able to manage more deeply UI of TabControl and TabPage For example - I want to manage border color, change color of TabPage reef, eliminate spaces from both sides of the reef, so I bould...
3
by: cdj | last post by:
Hi all, I've got a tabControl, initially with one tabPage, along with two buttons, one to add another tabPage, and one to delete the current (selected) tabPage. On each tabPage, when it is...
5
by: meh | last post by:
New to C#... I have a tab page with a handful of controls on it (label, combobox, etc.). Is it possible to "boilerplate a tabPage with the controls "like a MDI childForm" so that adding a new...
2
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: ...
1
by: RA | last post by:
Hi 1) I want to create a TabPage class in design mode - how do I do it? What type of project should I use? Is it going to be a custom control? 2) I have a TabControl that I would like to add to...
2
by: Richard | last post by:
Hi, Simple tabcontrol question: I have a tab control with a number of tabpages on it. What I want is to show a particular tabpage when I click a button that is not on the tabcontrol. Can...
0
by: Gianluca | last post by:
Hi All, i'm experencing a frustrating and strange behaviaour : I created a Windows project in VB.NET 2003 with a form and then I added a TabControl on the form, and added 5 TabPages on...
9
by: Michael Turner | last post by:
Hi Guys Having problem with the tab control, I need to set the background color to something different than the standard, I have found code on the web and now can redraw the tabpage buttons so...
2
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
by: VigneshAnand | last post by:
Hi, I am doing a small tool in .Net(C#). I have a TabControl in my application; I need to achieve two functionality in it as follows. 1. I have enabled drag-drop property for my tabcontrol,...
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: 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: 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:
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...
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...

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.