Tabcontrol loses its back color

G

Guest

Hi, I have a VB.NET 2005 application with a standard tabcontrol on it. The
application has the 'VisualStyles' enabled giving it an 'XP' look. For some
reason, the back color of this tabpane has suddenly changed to 'white'. It
used to be the standard 'control grey' color. The XP syle hasn't changed
though, just the color. This is strange because the tab control doesn't even
have a 'back color' property as far as I can see.

Some details:
- The application was converted from the 2003 format, although it has
behaved okay for a long time.
- The problem seems to have occured at some point after I added a third
party dll reference, although I have used this dll before and it should in
know way influence my control styles.
- Turning VisualStyles off returns the tab control to the standard grey
control color, turning it on again makes it go back to white.

Anybody know what has gone wrong or how to fix this?

Regards,

C. Hughes
 
G

gene kelley

Hi, I have a VB.NET 2005 application with a standard tabcontrol on it. The
application has the 'VisualStyles' enabled giving it an 'XP' look. For some
reason, the back color of this tabpane has suddenly changed to 'white'. It
used to be the standard 'control grey' color. The XP syle hasn't changed
though, just the color. This is strange because the tab control doesn't even
have a 'back color' property as far as I can see.

Some details:
- The application was converted from the 2003 format, although it has
behaved okay for a long time.
- The problem seems to have occured at some point after I added a third
party dll reference, although I have used this dll before and it should in
know way influence my control styles.
- Turning VisualStyles off returns the tab control to the standard grey
control color, turning it on again makes it go back to white.

Anybody know what has gone wrong or how to fix this?

Regards,

C. Hughes


Well, I had a similar event happen a few weeks ago except just the opposite. The
default TabControl is default VisualStyle enabled. The TabContol BackColor defaults
to the current system "Window" color. TabPages BackColor, by default, are
Color.Transparent,hence, you are supposed to see the white color. In my case, one of
the TabPages changed from Color.Transparent to the system control grey color for no
apparent reason, but as I recall, the problem appeared to be that a line of code in
the designer.vb had changed (for no apparent reason) changing the color from
Color.Transparent to the System control grey.

In your case, it would seem that if you want the System Control Grey, just change the
back color choice on the TabPages.


Gene
 

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

Similar Threads


Top