Reputation: 195
In Win7 theme it works good, but in win classic theme it looks weird.
In Win 7 theme :
In Win Classic theme:
Is there any chance to fix this ?
Upvotes: 2
Views: 1500
Reputation: 2151
Its the same question as go to How to change the background color of unused space tab in C# winforms?
you've to overload the OnPaintBackground
method
Upvotes: 0
Reputation: 10034
If you really want your own style-independent customized tab, draw the tab yourself using OwnerDrawFixed
. See an example on codeproject.
Upvotes: 2
Reputation: 942000
This is by design. It doesn't have anything to do with "change the colour", it is actually a transparency effect. The window is rectangular and not shaped to fit the tabs. The control first paints the space for the tabs by asking the parent window to draw itself, passing its own window handle. Then draws the tabs on top of that. You can see this by setting the parent's BackgroundImage property. Also the way that, say, the Label and PictureBox controls simulate transparency.
This is behavior implemented by the visual styles renderer. Windows Classic doesn't use any transparency effects.
If this is really important to you then do consider WPF. It doesn't use a window for its controls and is thus not affected by the selected theme.
Upvotes: 5