Solved

Add a checkbox to a tab in a tab control

Posted on 2002-05-23
8
255 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 2

Expert Comment

by:ventond
Comment Utility
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
Comment Utility
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
Comment Utility
The picture idea works best.  Thanks -- I didn't know you could do that.
0
 
LVL 6

Expert Comment

by:Nitin Sontakke
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

12 Experts available now in Live!

Get 1:1 Help Now