Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - .NET tab control not skinning properly
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

.NET tab control not skinning properly

 Post Reply Post Reply
Author
Message
YellowStreak View Drop Down
Groupie
Groupie


Joined: 07 April 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote YellowStreak Quote  Post ReplyReply Direct Link To This Post Topic: .NET tab control not skinning properly
    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? 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2008 at 8:20am
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
Back to Top
YellowStreak View Drop Down
Groupie
Groupie


Joined: 07 April 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote YellowStreak Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2008 at 9:20am
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.
Back to Top
YellowStreak View Drop Down
Groupie
Groupie


Joined: 07 April 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote YellowStreak Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2008 at 10:00am
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
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 31 July 2008 at 3:00am
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
YellowStreak View Drop Down
Groupie
Groupie


Joined: 07 April 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote YellowStreak Quote  Post ReplyReply Direct Link To This Post Posted: 31 July 2008 at 4:14am
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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 31 July 2008 at 4:21am
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
Back to Top
YellowStreak View Drop Down
Groupie
Groupie


Joined: 07 April 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote YellowStreak Quote  Post ReplyReply Direct Link To This Post Posted: 31 July 2008 at 5:59am

Fantastic! It worked.

I was assuming I had some code missing rather than too much!
 
Thanks very much for your help.
Back to Top
YellowStreak View Drop Down
Groupie
Groupie


Joined: 07 April 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote YellowStreak Quote  Post ReplyReply Direct Link To This Post Posted: 31 July 2008 at 6:47am
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?
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 01 August 2008 at 3:18am

Hi,

Add manifest for your application and selections will use skinned colors.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
YellowStreak View Drop Down
Groupie
Groupie


Joined: 07 April 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote YellowStreak Quote  Post ReplyReply Direct Link To This Post Posted: 01 August 2008 at 5:33am
That did the trick.
 
Thanks again.
Back to Top
LordCover View Drop Down
Newbie
Newbie


Joined: 08 October 2007
Location: Albania
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote LordCover Quote  Post ReplyReply Direct Link To This Post Posted: 02 August 2008 at 12:04am
Originally posted by Oleg Oleg wrote:

Add manifest for your application and selections will use skinned colors.
 
And how is that please?
 
I have the same problem.
 
thanks.
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2008 at 4:36am
In VC2003+ just add
 
static void Main() 
{
  Application.EnableVisualStyles()
  Application.DoEvents();
  Application.Run(new frmMain());
}
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.