![]() |
HOWTO: Change Color Gradient of Toolbar |
Post Reply ![]() |
Author | |
DDJJ ![]() Senior Member ![]() Joined: 13 December 2004 Status: Offline Points: 143 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
cj_user ![]() Newbie ![]() Joined: 14 August 2006 Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
DDJJ ![]() Senior Member ![]() Joined: 13 December 2004 Status: Offline Points: 143 |
![]() ![]() ![]() ![]() ![]() |
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).
![]() |
|
![]() |
|
cj_user ![]() Newbie ![]() Joined: 14 August 2006 Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
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 :{
|
|
![]() |
|
DDJJ ![]() Senior Member ![]() Joined: 13 December 2004 Status: Offline Points: 143 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
DDJJ ![]() Senior Member ![]() Joined: 13 December 2004 Status: Offline Points: 143 |
![]() ![]() ![]() ![]() ![]() |
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?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
yes, for Ribbon/Office2007 themes you can't change it.
Used predefined values.
|
|
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 |