.NET tab control not skinning properly |
Post Reply |
Author | |
YellowStreak
Groupie Joined: 07 April 2008 Status: Offline Points: 34 |
Post Options
Thanks(0)
Posted: 30 July 2008 at 5:36am |
I have a .NET tab control with two tab pages which I am applying the skinframework to. The skinning works fine when form first opens but when I change tabs - the tab page backcolor (set to btnface) goes white. Switching back to the previous tab shows that as now being white as well.
Any ideas how I can force this backcolor property?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You can try trick from our sample:
private void tabControl_SelectedIndexChanged(object sender, System.EventArgs e)
{ if (tabControl.SelectedIndex == 1) { skinFramework.ApplyWindow(this.tabPage2.Handle.ToInt32()); skinFramework.EnableThemeDialogTexture(this.tabPage2.Handle.ToInt32(), 6); } } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
YellowStreak
Groupie Joined: 07 April 2008 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
I'm already doing that. Before I applied that, things like the radio buttons were not skinning. Applying that change fixed those issues but the back colour thing just will not go away.
|
|
YellowStreak
Groupie Joined: 07 April 2008 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
uploads/20080730_095904_ColInteropTest.zip
Here is a mini project that shows the issue I'm having.
The demo is using VB6 and VS2005 VB.NET
You will need to Interop Tool Kit installed and also .NET framework 2.0 service pack 1.
Thanks
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
YellowStreak
Groupie Joined: 07 April 2008 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
Hi Oleg. Thanks for the response.
I tried your suggested changes but it is still not working. the tabs backgrounds still just appear as white. the radio buttons backcolor shows as the correct color I was expecting to see for the tabs.
Did you actually get the sample working correctly at your end?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Actually white color is background of TabPage. if you don't need it just don't call EnableThemeDialogTexture.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
YellowStreak
Groupie Joined: 07 April 2008 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
Fantastic! It worked. I was assuming I had some code missing rather than too much!Thanks very much for your help.
|
|
YellowStreak
Groupie Joined: 07 April 2008 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
As Ive got your attention I have one last issue that I thought I would sneak into this thread.
I am using a FlowLayout Panel that is dynamically populated at runtime with various controls.
The only way I could get the dynamically created controls to skin was to loop through them all and apply the skin individually:
For Each ctrl as Control in flpFlags.Controls
_frmStyles.SkinFramework.ApplyWindow(ctrl.Handle.ToInt32)
Next
This works but is it the best way? I have other flowlayouts on popup forms that are populated at formLoad and they seem to skin with OK with just form having the skin applied.
My only remaining problem is that the list/combo box highlighted row is not picking up the default skin value.
e.g if I am on a the blue theme it should be orange but it is still showing in its default Blue.
Any ideas?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Add manifest for your application and selections will use skinned colors.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
YellowStreak
Groupie Joined: 07 April 2008 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
That did the trick.
Thanks again.
|
|
LordCover
Newbie Joined: 08 October 2007 Location: Albania Status: Offline Points: 4 |
Post Options
Thanks(0)
|
And how is that please?
I have the same problem.
thanks.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
In VC2003+ just add
static void Main()
{ Application.EnableVisualStyles() Application.DoEvents();
Application.Run(new frmMain()); } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |