Setting colour of FontColorPicker image in custom ribbon button

N

Neil Humphries

I just started programming the Word 2007 ribbon this week. With help from
Greg Maxey's site and the CustomUI editor I have a simple but functioning
custom menu.

How do I use the imageMso=="FontColorPicker" for my custom controls? I don't
know how to assign a colour to the bar at the bottom of the image. This is
the same image used in Word on the Home tab Font group Font Color gallery.
The bar changes colour depending on the colour chosen in the gallery.

I don't need to change it dynamically, just set it onload. I have a number
of buttons to set custom text colours and want each image to display the
appropriate colour.
 
G

Greg Maxey

Neil,

You have asked a good question and I think I have a poor but perhaps
workable answer.

I think that the basic answer is you can't. As you have probably already
gathered the builtin controls have both an idMso and the ones that have an
image have an imageMso. The imageMso is like a static picture that can be
applied to custom controls, but it isn't smart like the actual image
associated with the builtin control.

What you should be able to do is capture your own custom images of the
builtin control showing the various colors you need and then apply them as
images to custom controls. Info at the following like may help:

http://gregmaxey.mvps.org/Ribbon_Custom_Icons.htm
 
N

Neil Humphries

It's not what I was hoping for, but at least I won't be wasting time trying.
Thanks for the assistance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top