![]() |
Split toolbar button behaviour |
Post Reply
|
| Author | |
etvorun
Newbie
Joined: 22 April 2005 Location: United States Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: Split toolbar button behaviourPosted: 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. Edited by etvorun |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
etvorun
Newbie
Joined: 22 April 2005 Location: United States Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
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? |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 April 2005 at 1:24pm |
|
See attached Sample 2005-04-26_132423_CustomizeDlg.zip |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |