Solved

Add a checkbox to a tab in a tab control

Posted on 2002-05-23
8
258 Views
Last Modified: 2012-05-04
I need a visual indicator that a tab contains data.  I was thinking of either a checkbox on each tab (which would be checked if that tab had data) or a bitmap.

Anyone know how I can put a control on a tab and have it visible whether or not the tab is selected?

The checkbox goes behind the tab if it is not the current tab....
0
Comment
Question by:bob_online
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 22

Expert Comment

by:rspahitz
ID: 7029956
You can always try putting the checkbox OUTSIDE the tab control (and with a ZOrder of vbBringToFront.)  This simply means that you must manually (or programmatically) align it whenever the tab control moves.
0
 
LVL 6

Expert Comment

by:Nitin Sontakke
ID: 7029957
See if you have an access to the font information of the tab text. If yes, change colour of it or make it italic, etc.

The tab caption text becomes bold when active, so it is out of question.


0
 
LVL 4

Accepted Solution

by:
gencross earned 100 total points
ID: 7030010
NitinSontakke has a good solution.  If you cannot change the text color or anything like that you can set a picture for each tab in the Microsoft Tabbed Dialog (SSTab), if that is what you are using.  You can use a bmp of a checkmark or something like that.  Hope this helps.
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7030170
FYI

The MS tabbed control was originally the Sheridan SSTab control, which was an enhancement of the TabStrip.

To get the tab strip to work, you basically added a bunch of frames to represent the different tab areas.  Each one that was not selected got shoved off the screen.

When you add a checkbox to the SSTab, it goes into the tab frame area that gets shoved off the screen when you select a different tab.

--
The picture idea indicated above seems to work if you don't mind the picture on the left of the text.

You can also simply add extra text to indicate something is there, like (*).

Otherwise, my checkbox idea outside the tab container would also work.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:ventond
ID: 7030864
Seems to me that if there was no data you could disable the tab.

tabcontrol.TabEnabled(tabnumber) = false

0
 
LVL 4

Expert Comment

by:gencross
ID: 7031777
ventond,

If you disable the tab then you cannot select the tab to enter data in any controls within the tab.  I assume data would be entered in the tab.  If not then this solution works.  The Asterick idea sounds like a good one as well.
0
 
LVL 5

Author Comment

by:bob_online
ID: 7033195
The picture idea works best.  Thanks -- I didn't know you could do that.
0
 
LVL 6

Expert Comment

by:Nitin Sontakke
ID: 7036636
Just as an afterthought, i would like to add something.

I was in big favour of showing images in place of disabled controls. I used to do it mostly on web-forms where the real controls will post their values, even if you don't want to.

However, with the release of Windows XP, now that OS has changed the appearance of controls, if i have an actual control and an image, both on same page, it looks a bit odd.

I simply wanted to share this with you.

Nitin.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now