Print Page | Close Window

CXPTRibbonGroup::SetIconId

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=23671
Printed Date: 04 December 2024 at 3:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXPTRibbonGroup::SetIconId
Posted By: Fredrik
Subject: CXPTRibbonGroup::SetIconId
Date Posted: 04 July 2018 at 5:42am
It's been a few versions and years like this, but calling SetIconId on a ribbon group has still no effect. Are there any plans to fix it? If not I suggest to remove the function but it would be handy to set the ribbon group icon instead of the current workaround.

//-----------------------------------------------------------------------
// Summary:
//     Call this member to set the group icon's identifier.  This is the Id of
//     the image to use for the group button that is displayed when there
//     is not enough room to display the items in the group.
// Parameters:
//     nId - Icon's identifier to be set.
// Remarks:
//      The m_nIconId specifies the Id of the image to use for the group button
//      that is displayed when there is not enough room to display the items
//      in the group.  When a group button is clicked, a CXTPControlPopup
//      is displayed that contains the items of the group.  No image will
//      be displayed for the group button if IconId is not set.
// See Also: IsReduced, GetIconId, GetControlGroupPopup


-------------
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0



Replies:
Posted By: cpede
Date Posted: 19 October 2020 at 8:47am
Yes, please fix this.

It is not possible to make dynamic Ribbons without this feature, and the method exist but does not do anything.


-------------
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: dbrookes
Date Posted: 30 October 2020 at 12:02am
I call both pGroup->SetIconId and pGroup->GetControlGroupPopup()->SetIconId. The control group popup is the button popup XTP displays when the group is collapsed or when it is added to the quick access toolbar.

Regards,
Daniel.


Posted By: cpede
Date Posted: 30 October 2020 at 3:05am
That did it :-) Now it works.

But where is the icon id on the group then used?


-------------
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: Fredrik
Date Posted: 30 October 2020 at 6:23am
I use GetGroups()->Add instead of AddGroup

pTab->GetGroups()->Add(L"My group name", ID_COMMAND_ID)


where ID_COMMAND_ID is associated with the icon I want to be used when the group is collapsed. But often I would be satisfied if just the icon of the first command was automatically displayed.

But I wish the release cycle on the toolkit would be faster and that one could send pull requests for things we have to do workarounds at the moment. The this would have been fixed years ago.

-------------
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0



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