Print Page | Close Window

SOLVED Backgroundcolor (Commandbar frame)

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11863
Printed Date: 21 December 2024 at 10:00pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED Backgroundcolor (Commandbar frame)
Posted By: adix
Subject: SOLVED Backgroundcolor (Commandbar frame)
Date Posted: 18 August 2008 at 7:08am

currently i'm searching for the ability to modify colors of a present theme .. and have props.
The help file is not very helpfull .. (above all how to create a gradient)

so i ask the community.

i try to define the backgroundcolor of the bar and window background of a Commandbar frame.

i've tested:
Step 1) add blank commandbar frame
Step 2) add by code some sample Buttons
Step 3) set the theme (.VisualTheme = xtpThemeVisualStudio2008)
Step 4) try to modify the colors with .SetSpecialColor (x,color)
  x = XPCOLOR_TOOLBAR_FACE or STDCOLOR_BACKGROUND .. i tried several values from the enum XTPColorManagerColor
 color = RGB - Value .. i tried also a Hex and long Value

Step 5) .RecalcLayout in order to refresh the bar

.. nothing works.

Can you please tell me how to modify the backgroundcolor (optional how to create a custom gradient [white to vbButtonface]) ?

Thanks in advance




Replies:
Posted By: Aaron
Date Posted: 18 August 2008 at 10:42am
Hi,
 
Try this:
 
  1. CommandBars.SetSpecialColor STDCOLOR_BTNFACE, vbRed   
  2. CommandBars.SetSpecialColor XPCOLOR_TOOLBAR_FACE, vbRed
 
It will paint menu (1) and toolbars(2) red
 
If the style is a gradient style, like xtpThemeVisualStudio2008, it will be gradient.
 
If your issue is solved, please add SOLVED in your Topic description and have a look at post http://forum.codejock.com/forum_posts.asp?TID=11225 - http://forum.codejock.com/forum_posts.asp?TID=11225



-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: adix
Date Posted: 18 August 2008 at 1:35pm

Hi Aaron,

thanx for your quick answer

i'v tested your solution .. but it's still not working 100% properly.

with .SetSpecialColor STDCOLOR_BTNFACE its possble to define the Background Color of a band if
the VisualTheme is xtpThemeOffice2000 or xtpThemeOfficeXP.

as far i switch the theme to xtpThemeNativeWinXP, xtpThemeOffice2003, xtpThemeOffice2007, xtpThemeRibbon, xtpThemeVisualStudio2008 or xtpThemeWhidbey is not working anymore.

SetSpecialColor XPCOLOR_TOOLBAR_FACE does not change any color (i've tested all possible theme combinations)

This occure with the "CommandBarsFrame" Control and the commandbar control.

I was also not able to create a gradient. can you please be so kind and post a quick sample for a gradient ?.
 


Posted By: Aaron
Date Posted: 19 August 2008 at 12:31am
Hi,
 
If you set a different visual style some settings will be destroyed.
So first set a visual style and after this set the color like this:
 
 
CommandBars.VisualTheme = xtpThemeVisualStudio2008
CommandBars.SetSpecialColor STDCOLOR_BTNFACE, vb3DLight
CommandBars.SetSpecialColor XPCOLOR_TOOLBAR_FACE, vb3DLight
 
 
If you would change a visual style you have to set colors again.
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Aaron
Date Posted: 19 August 2008 at 1:07am
Hi,
 
And you're probably right... I tested this with SkinFrameWork activated, as I turned off skinning the menu wasn't painted red anymore  
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: adix
Date Posted: 19 August 2008 at 3:25am

Aaron,

meanwhile i've found much more "features".
I'm sorry to say .. but the control is not 100% sophisticated as a stand-alone-product.
I'm searching for a modern commandbar replacement .. so i undecided to buy this control.

I dont plan to buy the whole suit - even the combobox control is very cool ;)

thanks for your qualified answers



Posted By: Aaron
Date Posted: 20 August 2008 at 2:03am
Hi,
 
It's a pity you don't plan to buy the control. For a few dollars more you would get a very nice set of controls (if you would buy the whole suite). I don't regret buying the entire suite, if I look at my previous app and now... totally new look . Well I wish you good luck finding simular control(s) if you don't plan to buy them.
 
Regards
a satisfied member
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net