Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXPTRibbonGroup::SetIconId
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXPTRibbonGroup::SetIconId

 Post Reply Post Reply
Author
Message
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post Topic: CXPTRibbonGroup::SetIconId
    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
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 668
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post 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++)
Back to Top
dbrookes View Drop Down
Groupie
Groupie


Joined: 30 August 2019
Location: Australia
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote dbrookes Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 668
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post 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++)
Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.199 seconds.