Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Icon of collapsed Ribbon group
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Icon of collapsed Ribbon group

 Post Reply Post Reply
Author
Message
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Topic: Icon of collapsed Ribbon group
    Posted: 07 June 2013 at 5:29am
Hi!
How can i set the icon of a collapsed group?

 

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: 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
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2013 at 2:59am
Thank you very much!

This one works:
pTab->GetGroups()->Add(_T("Fenster"), ID_WINDOW_SWITCH);
Thumbs Up
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post 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!
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.047 seconds.