Tab Control Background and Windows Theme

A

Accessizer

I want to check my understanding about using Stephen Lebans' solution
for coloring tabs' background. I'm pasting his old post, as replying
to the thread wasn't allowed.

His sample database seems to have "Use Windows themed controls"
disabled. Checking it back forces the background to remain white even
in his sample database.

Does this means there is truly no way of keeping Windows theme and not
have a white background for the tab control? I don't want/need custom
color, just the default gray. The white background is quite hard on
the eyes whereas choosing not to use Windows theme makes the database
look out of the place with the XP environment and thus irritating
users.

I already saw another post solution of pasting a rectangle behind the
tab control. As far as I can tell, this will not work, and transparent
control does exactly nothing.

But there's a possibility that I'm missing something simple here, so
maybe anybody could enlighten me?

Thanks!

B.
 
A

Arvin Meyer [MVP]

I tend to prefer a white form, but that's a personal preference. I wrote an
article in the Access/VB advisor magazine on how to create your own tab
looking controls which look and work the way you'd like. If you can get a
copy, it will answer your question:

http://msaccessadvisor.com/doc/13961

Advisor magazine still holds the copyright, so I an unable to produce it
here.
 
A

Accessizer

Arvin & Peter, thanks for replies.

I took a look, and managed to find a sample that demonstrate both
techniques you talked about.

The technique that employs a transparent tab control while using a
colored rectangle, however, will not work if Windows Theme is checked;
it forces a white background, even showing through the colored
rectangle.

OTOH, another technique demonstrating using frames stacked on top of
each other seems promising. But using Frames is only good for
checkboxes/options/toggle buttons, not for textbox/listbox/combobox.
If one could somehow "group" the text input controls with a frame,
stacking it wouldn't be too bad as it can be easily moved out and
edited if needed. Otherwise, editing a form with several stacked
controls would be hell.

Arvin, while you may be right about personal preferences, I don't see
how having a white background is good when you have a good number of
textboxes, conmboboxes or listboxes, all which uses a white
background. Doesn't that goes against the UI guidelines? Or am I
misunderstanding something here?

Any other suggestions?
 
A

Arvin Meyer [MVP]

Arvin, while you may be right about personal preferences, I don't see
how having a white background is good when you have a good number of
textboxes, conmboboxes or listboxes, all which uses a white
background. Doesn't that goes against the UI guidelines? Or am I
misunderstanding something here?

Any other suggestions?

I've always felt that grey is drab and monotonous. My forms generally don't
have so many controls on them that they are tiring to view. I mainly use
several color schemas. White with a dark blue, dark burgundy, or dark green
labels; or a buff color with brown, blue, or grey labels. I don't think that
I've built a grey form in a new project in several years. I still use grey
forms in existing projects.
 
A

Accessizer

Here's a possibility but I could be totally wrong. This is frankly a
bit above my head.

I understand that even if you develop tab controls for VB.NET, it's
not all roses, and due to limitations, they came up with a custom tab
control to work around the limitation, which includes coloring the tab
background. This looks much more slick; see for yourself (it's the
second section on the page)

http://www.dotnetrix.pwp.blueyonder.co.uk/controls.html

This is available as a .DLL

Normally, you can't use .NET DLL as Access is a .COM-based, not .NET-
based. However, I understand that it is possible to wrap .NET DLL and
make it available for the COM to call it. Here's a good article
detailing how:

http://dsmyth.blogspot.com/2006/03/calling-managed-code-from-vba-using.html

I don't have Visual Studio .NET, and even if I did, this is beyond my
ability at the present, and I don't even know if Access is capable of
accepting a dll for an extra control, and allow it to be selected and
modified when designing a form.

Is this a possible solution?
 
A

Arvin Meyer [MVP]

I wouldn't guarantee doing something outside of COM right now. As you know
there are different .NET libraries and those libraries may be unsupported in
the next version of Office. You might look at some of Stephen Lebans code
for tab controls:

http://www.lebans.com/tabcolors.htm
 
A

Accessizer

Arvin, thanks for the word of caution.

Unless I'm missing something obvious, I've already tried Leban's
sample and it comes with Windows theme unchecked. If I were to check
the theme, Leban's sample all gets a white background in despite of
colors, resulting in basically having two borders and looking bad.

One workaround (I'd call this a hack, actually) I'm currently
considering is to simply use subform in each page of tab, give it a
border that will work with the white background well and simply put up
with the extra hassle of referencing controls embedded in the subform.

Oh, also I tried and experimented with color scheme, like you
suggested but ran into a couple of problems. For example, I usually
use default record navigator, which apparently does not change color
among with the form. Same is true of record selector, which I sometime
give to my user if they need to easily select a entire record. Of
course, I could simply create my own buttons and code accordingly, but
my objective is to use as much as what Access already have, and stick
to Windows theme so I do not need to worry about whatever theme my
users may use and will look good no matter what. Tab control
background, IMO, does just not work that well with listboxes,
comoboxes and textboxes' white background. (and based on my initial
testing, changing theme usually does not change the tab control's
background, which can be even worse)

I hope that just perhaps, this can be solved somehow.

B.
 

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