Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - HOWTO: Change Color Gradient of Toolbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HOWTO: Change Color Gradient of Toolbar

 Post Reply Post Reply
Author
Message
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post Topic: HOWTO: Change Color Gradient of Toolbar
    Posted: 03 October 2006 at 9:48am
We're going to let our users select a style, just like you have done in your RibbonBar sample, using code like the following:
 
CommandBarsGlobalSettings.Office2007Images = App.Path & "\Styles\Office2007Aqua.dll"
CommandBars.PaintManager.RefreshMetrics
CommandBars.RecalcLayout
 
This works fine for the main form of our app, but on the various subforms of the app we use a cj Toolbar as the controlbox of each form, and we want a consistent appearance of the subform regardless of which style the user elects to use on the main form.
 
I've tried changing the gradient on the toolbar of the subforms without success (the colors used seem to be determined by which style is being used).  If this because I'm using the above code ("CommandBarsGlobalSettings"), or can someone point out how you change the colors on a toolbar...which color settings control the appearance of the toolbar gradient?
 
Thanks.
 
Dan
 
Back to Top
cj_user View Drop Down
Newbie
Newbie


Joined: 14 August 2006
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote cj_user Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2006 at 12:37pm

Had the same issue and after looking around in this forum I saw that you need to set LunaColors to False

CommandBars.Options.LunaColors = False
 
After that all my SetSpecialColor calls were working
Back to Top
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2006 at 2:38pm
Thanks.
 
I'm doing what you suggest, but still not getting the colors to change, as follows:
 
With objCB
        .VisualTheme = xtpThemeRibbon
        .Options.LunaColors = False
        .ActiveMenuBar.Visible = False
        .ActiveMenuBar.ContextMenuPresent = False
        .ActiveMenuBar.Customizable = False
        .Options.AlwaysShowFullMenus = False
        .Options.ShowExpandButtonAlways = False
        .EnableCustomization False
        .Options.UpdatePeriod = 100
        .Options.UseDisabledIcons = True
        .Options.SetIconSize False, 16, 16
        .Options.IconsWithShadow = True
        .SetSpecialColor XPCOLOR_TOOLBAR_FACE, vbBlack
        .RecalcLayout
 End With
 
See the following picture for what I am trying to change (the control box/CJToolbar is a blueish color probably derived from the Aqua theme; I want it to be a light greyish gradiant).
 
 
Back to Top
cj_user View Drop Down
Newbie
Newbie


Joined: 14 August 2006
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote cj_user Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2006 at 3:42pm
I tried different Visual Themes and the only themes that it seems to allow you to do that are: xtpThemeOffice2000 = 0, xtpThemeOfficeXP = 1, xtpThemeOffice2003 = 2,
 
sorry couldnt be of more help :{
Back to Top
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2006 at 5:54pm
Thanks cj_user.
 
Oleg, could you confirm this?  Although I really like how themes make our main form "sing", I really didn't want to have to use related colors on all other forms in the app.
 
Dan
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: 04 October 2006 at 12:40am
Hi,
 
I not sure where problem :(
 
If you use VisualTheme = xtpThemeRibbon it will look like Office2007 theme. If you dont[' want it , don't set this theme. Try xtpThemeOffice2003 or something.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post Posted: 04 October 2006 at 12:42pm
Oleg, the problem is we like the 2007 theme on our main form, and we want to use it for that reason.  We don't however, like the theme's appearance when used on all of the other various forms used by our application.
 
Can I assume from your response that cj_user is correct when stating that you cannot customize toolbar colors when the VisualTheme is set to xtpThemeRibbon?
 
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: 05 October 2006 at 10:20am
Hello,
 
yes, for Ribbon/Office2007 themes you can't change it.
Used predefined values.
 
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.031 seconds.