How to add two ImageLists for Ribbon icons in16x16 and 32x32

Add-in Express™ Support Service
That's what is more important than anything else

How to add two ImageLists for Ribbon icons in16x16 and 32x32
 
Vladim?r Klaus


Guest


Hello

I look for possibility to define second ImageList, because 32x32 icons doesn't look well in 16x16 (stretch) version.

See example here:
http://temp.audrey.cz/addinexpress/SmallIcons.png

Vladim?r
Posted 27 Mar, 2014 04:53:37 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Vladim?r,

You can put another ImageList onto your add-in module and populate is with images. Then specify that ImageList and an image from it in the properties of the Ribbon control.


Andrei Smolin
Add-in Express Team Leader
Posted 27 Mar, 2014 06:31:04 Top
Vladim?r Klaus


Guest


Hello Andrei,

sorry but I don't understand. TadxRibbonTab has only one ImageList. I'd like to set image index and button should display 32x32 or 16x16 version. It depends on space (width of Outlook window).

When I work wirh DevEx components there are LargeImageList and SmallImageList with "shared" image index.

Vladim?r
Posted 27 Mar, 2014 06:44:46 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Vladim?r,

Now you work with Office itself. Add-in Express components do not display the Ribbon directly (like DevExpress). Instead they create a markup that Office displays.

Vladim?r Klaus writes:
I'd like to set image index and button should display 32x32 or 16x16 version.


I don't know if this is possible to achieve. Looks at http://msdn.microsoft.com/en-us/library/ee691834%28v=office.14%29.aspx - it creates a strong impression that this is impossible.


Andrei Smolin
Add-in Express Team Leader
Posted 27 Mar, 2014 07:52:34 Top
Vladim?r Klaus


Guest


Hello Andrei,

I'm not professional in Ribbon/Office design. Maybe they have some special "internal" functions because when you look at new attachment there is pixel-perfect version of 16x16 icons (on the right) when I change width of Outlook window. No bad antialiasing, no "nearest neighbor" resizing.

http://temp.audrey.cz/addinexpress/IconQuality3.png

Vladim?r
Posted 28 Mar, 2014 06:41:12 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Vladim?r,

We will spend some more time on this. I'll let you know about our results on Tuesday.


Andrei Smolin
Add-in Express Team Leader
Posted 28 Mar, 2014 10:55:35 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Vladim?r,

We've created a wrapper implementing the IPictureDisp interface so that Office is given our wrapper when it looks for an image. The wrapper allows checking if Office retrieves the second image in the underlying .ICO containing 32x32 and 16x16 images. The result: Office doesn't attempt to get the second image.

This means that the only workaround you have is to set AutoScale=false. This prevents your Ribbon group from autoscaling and in this way you disallow Office to spoil the images of your Ribbon controls.


Andrei Smolin
Add-in Express Team Leader
Posted 01 Apr, 2014 03:32:04 Top
Vladim?r Klaus


Guest


Hello Andrei,

thank you very much for your effort.

I suppose Office is able to load small image via internal callback. When I create button (Custom UI editor) with using their internal identification (imageMso="AllCategories") it automaticaly uses 2 versions when needed. When I use my icon (image="myicon") it only loads it as is.

http://temp.audrey.cz/addinexpress/IconQuality4.png

Vladim?r
Posted 02 Apr, 2014 01:43:10 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Vladim?r,

Alas, there's no such possibility in the Ribbon schema.


Andrei Smolin
Add-in Express Team Leader
Posted 02 Apr, 2014 02:24:09 Top