Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Split toolbar button behaviour
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Split toolbar button behaviour

 Post Reply Post Reply
Author
Message
etvorun View Drop Down
Newbie
Newbie


Joined: 22 April 2005
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote etvorun Quote  Post ReplyReply Direct Link To This Post Topic: Split toolbar button behaviour
    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.



Edited by etvorun
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
etvorun View Drop Down
Newbie
Newbie


Joined: 22 April 2005
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote etvorun Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2005 at 1:24pm

See attached Sample   2005-04-26_132423_CustomizeDlg.zip

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.