Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Ribbon colors customization -- How?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon colors customization -- How?

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


Joined: 04 May 2010
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote wssdev Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon colors customization -- How?
    Posted: 16 September 2010 at 3:40am
First off, I did not want to hijack this thread https://forum.codejock.com/forum_posts.asp?TID=17238, as my question will be a bit more precise.

I'm trying to build my own custom ribbon theme. As an exercise, I took Office2007Blue theme as a starting point. Even without documentation, the customization seemed to be fairly straightforward: all that was needed was to modify a number of .png images and a .ini file... Or at least I thought so. :)

There is a number of images in the 'res' folder that have 'Ribbon' in their names, so these were naturally the ones that I've modified first, changing the blue color to be slightly darker (see the picture below).

After I modified all those images, there were still some parts of the ribbon that simply refused to be displayed in my own colors.

First, I have created the Update button (on the picture below) like this:

CXTPRibbonGroup* groupApplications = tab->AddGroup(ID_RIBBONGROUP_APPLICATIONS);
groupApplications->SetControlsGrouping(TRUE);
...
CXTPControl* ctrlUpdate = groupApplications->Add(xtpControlButton, ID_UPDATE);
ctrlUpdate->SetBeginGroup(TRUE);
ctrlUpdate->SetStyle(xtpButtonIconAndCaption);
// set 16x16 icon...



It seems that the background of my button still has a color that comes from some part of the original Office2007Blue theme, some part that I did not modify. But which one?

I did change every single 'Ribbon'xxx.png image and even some other images (like, for example, PushButton.png), but none of them corresponds to that part of the ribbon. I also went and changed virtually all RGB values in the corresponding .ini file, but none of them affects this background.

[Edit: please ignore, this turned out to be the issue with our images.]
Another issue is the bottom part of the group frame. It appears that RibbonGroupCaption.png is the image that corresponds to that part of the ribbon. I don't have this light frame color anywhere in my customized image, and yet it somehow shows up at runtime.

It seems that the embedded theme images do not get displayed as-is, but instead some additional transformation gets applied to them at run-time.

Questions:

- where/what are the colors/images responsible for drawing the button and the border frame shown above?

More generally,

- is there a document that describes the customization process?
    - what images go where on the ribbon?
    - which colors from the .ini file affect ribbon (apart from those from the [Ribbon] section)?
    - what color transformations get applied at runtime?

Thanks in advance!

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.152 seconds.