PDA

View Full Version : Solved: Put special character on a button?



clhare
12-06-2012, 10:06 AM
Is it possible to put special characters and symbols on a button in the 2010 ribbon using the Custom UI Editor? For example, I'd like to put a division symbol, a less than or equal to symbol, and a greater than or equal to symbol on buttons.

Thanks!

Cheryl

Paul_Hossler
12-06-2012, 10:56 AM
You can put your own PNG file on the ribbon with the CustomUI editor:

Insert Icons and browse, or the little 'Mountain/Moon' icon

To use your own image, use 'image=MyPic' and not 'imageMso=FileOpen'


<button id="bDarkGray"
label="Dark Gray"
showLabel="false"
onAction="modCallbacks.ShadePressed"
image="DarkGray"
screentip="Shade selected cells Dark Gray"
/>


Also there's many sites with free and very good PNG files to use

http://www.iconarchive.com/


Paul

clhare
12-06-2012, 06:24 PM
I tried using SnagIt to capture the images I created in Word 2003 as .png files (I don't have PhotoShop), but the quality in 2010 was not good. I was hoping there was a way to use ASCII codes or something. Oh well...

Cheryl

Paul_Hossler
12-07-2012, 06:37 AM
http://www.iconarchive.com/show/blue-bits-icons-by-icojam.2.html

There's plus, minus, times, etc. + other characters

might search for pre-made PNG's in the site, many, many, many choices

Also the freeware Paint.net will make PNGs, but that's too much work for me

Easier to use a pre-made PNG

Paul

Frosty
12-10-2012, 03:36 PM
I agree with using a pre-made PNG. You can also look up GIMP, which is a shareware program that lets you recreate some symbols (I needed to do this).

But check out
http://www.microsoft.com/en-us/download/details.aspx?id=21103

That's a list of all the built-in Microsoft Office control graphics that are available to you if you use imageMso within the CustomUI editor.

That's even easier than loading custom graphics into your project.

Also, note that you may need to versions of any custom graphics: a 16x16 version and a 32x32 version (if it's going on a large button).

clhare
12-13-2012, 10:48 AM
All the icon images I want in 2010 are on custom toolbar buttons I had previously created in Word 2003. I finally got them on the 2010 ribbon, but it took quite awhile to figure out. Here's what I did:

-- I copied the icon from my toolbar button in Word 2003 and pasted it in Paint (as per one of Greg Maxey's demos at http://gregmaxey.mvps.org/word_tip_pages/ribbon_custom_icons.html).

-- Once in Paint, I verified the icon was 16x16 pixels using Image > Attributes (for a small button) and then saved it as a .png file.

-- Next I had to email the file to myself so I could open it in Gimp on my Mac (I have Paint on my work PC and Gimp on my Mac).

-- I opened the image in Gimp and zoomed to 800%.

-- I used the Fuzzy Select tool and clicked in a background area and then selected Edit > Clear to remove the background.

-- Once all background areas in the image were removed, I resaved the file and then exported it as a .png.

-- Next I had to email the updated .png file back to myself to get it on my work PC again.

-- Once back on my PC, I added the image to the Custom UI Editor file and it's on the ribbon looking just as it did in Word 2003 except with a transparent background!

Alot of trial and error, but this finally worked. Whew!

Cheryl