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




Posts: 20
Joined: 2014-03-03
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: 14129
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.

Regards from Belarus (GMT+3),

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




Posts: 20
Joined: 2014-03-03
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: 14129
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.

Regards from Belarus (GMT+3),

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




Posts: 20
Joined: 2014-03-03
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: 14129
Joined: 2006-05-11
The user may right-click your first button and choose "Add to Quick Access Toolbar" on the context menu.

Regards from Belarus (GMT+3),

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




Posts: 20
Joined: 2014-03-03
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