Tab Control - conditional formatting

S

SAC

I'm using Access 2000.

Can I change the a tab control tab based on some criteria?

I would like to change the color of the tab if a control on the tab meets a
criteria.

Thanks.
 
S

SAC

OK, I figured out how to put an image on the tab.

How would I code a different image based on criteria....how do I reference a
tab on a tabbed control and the picture property for it?

Thanks.
 
S

SAC

Would it be.....

???.picture = "C:\........path to picture"

I also noticed that there's a paintpalette and a pallettesource. Can/Should
I use these. If so...how would I reference them?

Thanks.
 
S

SAC

This code doesn't work...

TabCtl16.Pages(0).Picture = "D:\Documents and Settings\Administrator\My
Documents\My Pictures\green.bmp"

It says "Object required."

What do I need to put in front of it to reference it?

Thanks
 
S

Stephen Lebans

See:
http://www.lebans.com/tabcolors.htm
Tabs.zip is an MDB containing a class to enhance the standard Access TAB
control in order to allow for:

1) Tabs of any color

2) Rotated Text

Notes:

You must set the Tab controls TAB Fixed Height and Width properties

You must set the Individual Tab pages TAG property to whatever color value
you desire.



History

Version 1.6

Added support to allow for the coloring of just the Current/Active TABS and
not the background of the Tab control

Version 1.5

Fixed Bug under Windows NT or higher and Color depth set to 16 bits. Tab.
Added sample Form with minimum implementation code.

Version 1.4

Added code to auto select Tabs as user passes Mouse above the Tab. Final
adjustments to logic to size Bitmaps to exactly match preset dimensions of
Tab pages. Cleaned up code. Just need to remove a few more API declares and
the code is clean!

Version 1.2
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
S

SAC

Thanks!

Stephen Lebans said:
See:
http://www.lebans.com/tabcolors.htm
Tabs.zip is an MDB containing a class to enhance the standard Access TAB
control in order to allow for:

1) Tabs of any color

2) Rotated Text

Notes:

You must set the Tab controls TAB Fixed Height and Width properties

You must set the Individual Tab pages TAG property to whatever color value
you desire.



History

Version 1.6

Added support to allow for the coloring of just the Current/Active TABS and
not the background of the Tab control

Version 1.5

Fixed Bug under Windows NT or higher and Color depth set to 16 bits. Tab.
Added sample Form with minimum implementation code.

Version 1.4

Added code to auto select Tabs as user passes Mouse above the Tab. Final
adjustments to logic to size Bitmaps to exactly match preset dimensions of
Tab pages. Cleaned up code. Just need to remove a few more API declares and
the code is clean!

Version 1.2
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top