Print Page | Close Window

Icon of collapsed Ribbon group

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=21695
Printed Date: 11 September 2025 at 8:28am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Icon of collapsed Ribbon group
Posted By: Alex H.
Subject: Icon of collapsed Ribbon group
Date Posted: 07 June 2013 at 5:29am
Hi!
How can i set the icon of a collapsed group?

 




Replies:
Posted By: Fredrik
Date Posted: 10 June 2013 at 5:02am
According to CXTPRibbonGroup header file you should be able to use:
	// 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.
pGroup->SetIconId(int nId);
but it does not seem to work(?), at least not the following (using RibbonMDISample):
	CXTPRibbonGroup* pGroupFile = pTabHome->AddGroup(ID_GROUP_FILE);
pGroupFile->SetIconId(ID_FILE_NEW);
However, try this:
pTab->GetGroups()->Add(_T("Fenster"), ID_WINDOW_SWITCH);

or perhaps:
pGroup = pTab->AddGroup(ID_WINDOW_SWITCH);
pGroup->SetCaption(_T(Fenster"));
It would have been convenient if AddGroup could take an extra parameter for collapsed icon id.



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


Posted By: Alex H.
Date Posted: 12 June 2013 at 2:59am
Thank you very much!

This one works:
pTab->GetGroups()->Add(_T("Fenster"), ID_WINDOW_SWITCH);
Thumbs Up


Posted By: Alex H.
Date Posted: 01 July 2013 at 10:38am
But this seems to be a bug in XTP because the ID of the group is something different compared with the icon ID.
Means:
SetIconId
has a bug!



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