Home All Groups Group Topic Archive Search About

Tabpage defaulting to BackColor: Transparent

Author
12 May 2009 9:44 AM
Dean Slindee
Using VS2008: I can set the BackColor of all tabpages within a TabControl to
Color.Control manually.  However, the next time that I change a control on
the tabpage, all of the tabpages within that tabcontrol will have their
BackColor automatically changed to Transparent.

I think this behavior started with VS2005, not sure.  Is this normal?
Shouldn't the BackColor of any tabpage default to Control?

Thanks in advance.
Dean Slindee

Author
14 May 2009 2:53 PM
Mick Doherty
This behaviour started in VS2005 when a new property was added so that
tabpages could use the texture specified in Visual Styles.

Set the tabpages UseVisualStyleBackColor to false if you do not want a
transparent tabpage. TabPage.BackColor will then default to
SystemColors.Control.

Show quoteHide quote
"Dean Slindee" <slin***@charter.net> wrote in message
news:6A9A30E5-8473-45A1-BDBD-D43F33DBCBBE@microsoft.com...
> Using VS2008: I can set the BackColor of all tabpages within a TabControl
> to Color.Control manually.  However, the next time that I change a control
> on the tabpage, all of the tabpages within that tabcontrol will have their
> BackColor automatically changed to Transparent.
>
> I think this behavior started with VS2005, not sure.  Is this normal?
> Shouldn't the BackColor of any tabpage default to Control?
>
> Thanks in advance.
> Dean Slindee
>