![]() |
How to use CXTPRibbonGroup::SetIconId()? |
Post Reply ![]() |
Author | |
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 921 |
![]() ![]() ![]() ![]() ![]() Posted: 24 March 2010 at 6:53pm |
I am trying to use the SetIconId method on a CXTPRibbonGroup. I can set the icon id with no problem. But when I squeeze the app frame so the groups collapse and the group is drawn, the display code is not using the image I set. Instead another icon is drawn that is obtained by using the CXTPControl::GetIconId method. When squeezed down I can step through drawing code and the CXTPRibbonPaintManager::DrawControlGroupPopup CJ is called from CXTPRibbonGroup::Draw (when "m_pControlGroupPopup->IsVisible" returns true).
I can see the CXTPRibbonGroupControlPopup has the pointer to the actual group that has the m_nIconId set to my image id. But it is not being used. It looks like the code that creates the group control popup should be copying the group's icon id as well as the data it is copying. Since I don't create these group popups directly, I can not figure out how to get CJ to draw with the icon using the Id I set using CXTPRibbonGroup::SetIconId().
This also happens when I right-click and add the group to the QAT.
The xtpribbongroup.h file has comments that indicate m_nIconId specifies the icon to draw when there is not enough room to draw the group. But that is not happening. Is this a bug?
So ... how do I set an icon for a group that is not the same as the group ID that will actually be displayed on the QAT or on the ribbon because there is not enough room on the ribbon to display the group itself?
|
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 921 |
![]() ![]() ![]() ![]() ![]() |
I found a way around the bug.
pGroup->SetIconId // does nothing discernable
pPopup = pGroup->GetControlGroupPopup
pPopup->SetIconId // icon will be used when group is added to QAT or group is displayed as a "button".
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |