Solved

Add a checkbox to a tab in a tab control

Posted on 2002-05-23
8
261 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 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