Icon in Quick Access Toolbar

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

Icon in Quick Access Toolbar
How and where to define icon for action in Qick Access Toolbar 
Vladim?r Klaus


Guest


Hello,

I use your VCL components with Outlook 2016 and have no idea how to define an icon for QAT. Current small version generated from large icon is unuseble.

User added an image

Best regards
Vladim?r
Posted 31 May, 2016 04:03:26 Top
Andrei Smolin


Add-in Express team


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

The Ribbon schema allows using a single image per Ribbon control. You can use a small image on the button and Office will use the same image for the QAT.


Andrei Smolin
Add-in Express Team Leader
Posted 31 May, 2016 04:55:04 Top
Vladim?r Klaus


Guest


Hello Andrei,

do you mean Ribbon schema from Microsoft or your implementation?

As you can see there are two different icons for the same action and I'd like to know how to prepare it in your components or via special code.
User added an image

Can't accept using 16x16 icon in Ribbon, since I need to prepare professional add-in.

Best regards
Vladim?r
Posted 01 Jun, 2016 01:07:57 Top
Andrei Smolin


Add-in Express team


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

Vladim?r Klaus writes:
do you mean Ribbon schema from Microsoft or your implementation?


I mean the Ribbon schema. It doesn't define a way for a custom control to have several images. See also the second and third comments at https://blogs.msdn.microsoft.com/jensenh/2006/11/27/ribbonx-image-faq/#comment-57433.

In theory, the GetImage callback could provide the image size requested as a parameter but it doesn't.

Studying the flow of callbacks for Ribbon buttons, I've found out that for a regular Ribbon button, you get these calls (in this order):
- Visible
- Enabled
- Caption
- Glyph
- ShowCaption
- ShowImage
- Size

If you add this button to QAT, you get these calls:
- Enabled
- Glyph
- Caption

As you can see, the Glyph (GetImage) callback follows the Caption callback in the first case and they are called in the reverse order in the second case. This is true for PowerPoint 2010-2016 (I suppose this is true for all other Office applications). That is, you may want to use this fact to provide a correct image to Office. Note that the order of callbacks isn't defined so it may change this day or other.


Andrei Smolin
Add-in Express Team Leader
Posted 01 Jun, 2016 04:09:25 Top
Vladim?r Klaus


Guest


Hello Andrei,

thank you for really detailed information. It seems to me too complicated (for now).

I prepare second button which is invisible in ribbon but still accessible for QAT. It is not elegant but it works good for Outlook 2010/2016.

User added an image

Vladim?r
Posted 02 Jun, 2016 02:15:15 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
The user may right-click your first button and choose "Add to Quick Access Toolbar" on the context menu.


Andrei Smolin
Add-in Express Team Leader
Posted 02 Jun, 2016 02:56:36 Top
Vladim?r Klaus


Guest


I know, I know :( I'll try to prepare correct version later.

Thank you very much
Vladim?r
Posted 02 Jun, 2016 13:05:12 Top