Print Page | Close Window

How to Update a SplitButton's Icon?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=4901
Printed Date: 04 March 2025 at 9:49am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to Update a SplitButton's Icon?
Posted By: Sstar9
Subject: How to Update a SplitButton's Icon?
Date 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



Replies:
Posted By: Oleg
Date Posted: 28 August 2006 at 12:10pm
Hello,
Add update handle for button and
 
 CXTPControl* pPopup = CXTPControl::FromUI(pCmdUI);
 if (pPopup)
 {
  pPopup->SetIconId(m_iconId);
 }
 


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Sstar9
Date Posted: 31 August 2006 at 6:10am
Thanks, Oleg, that works.
 
But before that, XTPImageManager()->SetIcons() should be called.
 


-------------
Sharing makes life better



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