V
vancouver tom
I am using Windows Themed Controls, and sticking to Windows colors, so
that my form will change appearance to match the user's Windows XP
Display settings.
This means I use -2147483633 or Transparent as the background color for
most things.
Problem: I cannot duplicate the background color of a Tab Control. It
seems to be a special color, derived from the Detail.BackColor but
without its own color number.
This is a problem for Option Group labels.
When Access creates an Option Group, it places the associated label so
that it obscures a portion of the Option Group's surrounding border.
The label's background is opaque, to prevent the border from showing
through.
On a normal Form background, the label will blend in if the same
background color is used for the form and for the label.
But Tab control backgrounds are different.
I don't want the label to look like it has its own rectangular
background; I want it to blend in to the rest of the Tab Control page.
My current workaround is to create a Box control on each Tab page, and
set the Box backcolor to -2147483633. This way, the labels blend in.
But it spoils the themed look.
I am guessing that the problem is caused by Access using a simpler
color model than the Windows.Forms color model.
Is there a way, at runtime, to sniff the actual RGB color for a Tab
Control background? and then either set all label backgrounds in code,
or poke that color into an unused -21474836xx slot?
Any ideas appreciated!
....Tom
that my form will change appearance to match the user's Windows XP
Display settings.
This means I use -2147483633 or Transparent as the background color for
most things.
Problem: I cannot duplicate the background color of a Tab Control. It
seems to be a special color, derived from the Detail.BackColor but
without its own color number.
This is a problem for Option Group labels.
When Access creates an Option Group, it places the associated label so
that it obscures a portion of the Option Group's surrounding border.
The label's background is opaque, to prevent the border from showing
through.
On a normal Form background, the label will blend in if the same
background color is used for the form and for the label.
But Tab control backgrounds are different.
I don't want the label to look like it has its own rectangular
background; I want it to blend in to the rest of the Tab Control page.
My current workaround is to create a Box control on each Tab page, and
set the Box backcolor to -2147483633. This way, the labels blend in.
But it spoils the themed look.
I am guessing that the problem is caused by Access using a simpler
color model than the Windows.Forms color model.
Is there a way, at runtime, to sniff the actual RGB color for a Tab
Control background? and then either set all label backgrounds in code,
or poke that color into an unused -21474836xx slot?
Any ideas appreciated!
....Tom