Print Page | Close Window

Split toolbar button behaviour

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=2148
Printed Date: 07 November 2025 at 10:46pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Split toolbar button behaviour
Posted By: etvorun
Subject: Split toolbar button behaviour
Date Posted: 22 April 2005 at 9:18am

There is something wrong with xtpControlSplitButtonPopup style toolbar buttons. When I select a button from drop-down choices I expect the selected button to replace the main button. For example check XT's Visual Studio 7 sample app, Class View button (on the right). Even if I select Output from the drop-down the main button stays Class View. Compare it with actual Visual Studio 2003. Also check any other MS applications with split toolbar buttons, e.g. Word, Excel.




Replies:
Posted By: Oleg
Date Posted: 25 April 2005 at 11:16pm

It is designed behaviour. You must manually change it. For example "New" button of Outlook don't change self icon.

pControl->SetIconId.



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


Posted By: etvorun
Date Posted: 26 April 2005 at 9:13am

Thanks Oleg

 

I thought of Outlook's "New" button as an exception rather than a rule. A good exception.

 

Back to the problem. What would be a good place and time to call SetIconId. Obviously I cannot do it when processing ON_COMMAND as the command could have been triggered by a shortcut or a context menu. Overriding OnExecute in CXTPControl-derived classes (e.g. CXTPControlButton) also does not look like a good idea. This way I will end up overriding lost of classes due to the nature on CXTPControl creation framework (which is somewhat hard-coded; calls like CXTPControlButton::CreateObject do not leave space for flexibility).

 

Can you recommend a solution?



Posted By: Oleg
Date Posted: 26 April 2005 at 1:24pm

See attached Sample   http://forum.codejock.com/uploads/oleg/2005-04-26_132423_CustomizeDlg.zip - 2005-04-26_132423_CustomizeDlg.zip



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



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