I have a TabControlExt with Themes Enabled.
I added couple of Tab Pages to it. To one of the pages I added a GroupBox and couple of Labels. TabPage is coming up white. But the GroupBoxes and labels are coming up Grey (Color.Control).
When themes are enabled, TabPageExt is ignoring the BackColor (which is fine) and is drawing white (themed drawing) bg color. I want to set my GroupBoxes and labels back color also white.
How do I get this themed BackColor?
When themed drawing is enabled in the tabpages, I suppose you want your group box to be drawn transparent? Then try setting the group boxes backcolor to transparent. There are some issues with certain controls not getting drawn transparently when on a tab page, which we are currently working on.
AdministratorMay 23, 2003 08:55 AM UTC
will this be fixed in version 1.6?
Ramesh PraveenMay 28, 2003 03:33 PM UTC
Yes, the tabcontrol in 1.6 will support transparent backgrounds in it's child controls when the tab is themed.
AdministratorJuly 1, 2003 09:41 AM UTC
I just downloaded version 1.6 and when I add a UserControl-object a get a runtime-error, if I set this object's BackColor to Color.Transparent...
I guess this is only an issue with a UserControl-object - is there another class I can use instead? I was thinking a Panel, but the I loose design-time GUI...
Ramesh PraveenJuly 1, 2003 03:23 PM UTC
In your user control do this:
then the control should accept transparent BC.
AdministratorJuly 2, 2003 04:29 AM UTC
Sorry, but that doesn't seem to work for me... I can't see any difference whether or not I include...
...on the UserControl's InitializeComponent-method.
Ramesh PraveenJuly 7, 2003 06:57 PM UTC
And then you should set the UserControl's BackColor to Transparent. If this still doesn't work, I am surprised as I do see this work here. Please do double check.
AdministratorJuly 15, 2003 06:48 AM UTC
this.BackColor = Color.Transparent;
My mistake, sorry!
AdministratorAugust 18, 2003 06:01 PM UTC
I am still trying to fix this in my code on Windows XP Professional/.NET 1.1.
Please run the attached sample. Click between the three tabs and see the problem.
First tab has label and checkbox bg color set to transparent. Checkbox1 has white bg for some reason.
Second tab has tab page bg color set to transparent. The groupbox does not render properly.
Third tab has a panel and a groupbox inside the panel. The panel bg color is set to transparent. GroupBox does not render properly.
I want the tabs to have a system look and feel with the contents of the tab without the blue color (frame bg color).
Please let me know where and what to fix.
Arun SrinivasanAugust 26, 2003 01:14 PM UTC
Yes this is a well known problem. Unfortunately, this is a limitation in many of the .net controls, as they can be transparent only in certain modes. This is a problem with the themes support in windows which discussed here:
So in tabbed pages your child controls should be set to not use the themed background , instead they should be set to be drawn transparent as themed and transparent is not supported as discussed above.