Print Page | Close Window

Custom icons on ribbon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=21908
Printed Date: 08 July 2024 at 1:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Custom icons on ribbon
Posted By: rconn
Subject: Custom icons on ribbon
Date Posted: 12 October 2013 at 9:52pm
Using 16.2.4 & VS2012
 
How can I assign an icon (or bitmap) to an individual control in a ribbon group?



Replies:
Posted By: rconn
Date Posted: 13 October 2013 at 12:02pm
OK, I figured out how to get the icon onto an individual control.
 
But when I call the group add method and then add the icon, I always get the 16x16 icons and three rows in the group.  How can I specify that the group (or an individual control) should display as 1 row, 32x32 icon, and have the caption below it instead of to the right?  (Specifying a 32x32 icon doesn't do it; it just overwrites the caption displayed to the right).


Posted By: rconn
Date Posted: 13 October 2013 at 4:49pm
I found the "pControl->SetStyle( xtpButtonIconAndCaptionBelow)" method to put the caption below the icon.  But the icon still shows as 16x16; the SetIconSize() method doesn't affect it.
 
So, I can now do most of what I want, except I can't get the ribbon to use 32x32 icons when they're individually assigned.


Posted By: Alex H.
Date Posted: 16 October 2013 at 3:02am
Hi!

I have used a special PNG containing alls 32*32 pictures.

pCommandBars->GetImageManager()->SetIcons(IDB_PNG_RIBBON_LARGE, uiLargeIcons, _countof(uiLargeIcons), CSize(32, 32));

This worked for me.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net