![]() |
How to Update a SplitButton's Icon? |
Post Reply ![]() |
Author | |
Sstar9 ![]() Newbie ![]() Joined: 25 August 2006 Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() Posted: 28 August 2006 at 10:51am |
I have toolbar in a dialog. I want to dynamically modify the icon of the a split button in my program, is there anyway I could do it.
For example, in the toolbar, I created a split button is named "Width". Clicking on its drop-down button, a list a width will show and user could select one out of the list. After user's selection, I want the "Width" button to display a stroke with the current selected width, how to do that?
I have checked the tear-off Popup example, however, I found that the CXTPControlPopupColor class is built-in class and after user select the color, the SetColor() function could be used to update the color. But there is no CXTPControlPopupWidth class. Without this class, how can I get this job done manually?
|
|
Sharing makes life better
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Add update handle for button and
CXTPControl* pPopup = CXTPControl::FromUI(pCmdUI);
if (pPopup) { pPopup->SetIconId(m_iconId); } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Sstar9 ![]() Newbie ![]() Joined: 25 August 2006 Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() |
Thanks, Oleg, that works.
But before that, XTPImageManager()->SetIcons() should be called.
|
|
Sharing makes life better
|
|
![]() |
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 |