Print Page | Close Window

Disable customisation problem

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=2876
Printed Date: 04 March 2025 at 9:02pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Disable customisation problem
Posted By: brianh
Subject: Disable customisation problem
Date Posted: 12 September 2005 at 4:15am

Hi, if you set the xtpFlagNoMovable option for a toolbar control it stops the user from being able to move or delete the control via the toolbar customisation dialog (as expected), but it still allows them to hide the control from the pop-out menu!

Also, I hide/show some toolbar controls depending on the context in the view, these controls are all marked as not movable, but when the 'Reset' option is chosen from the pop-out menu all controls, including those marked as not movable are 'restored' to the toolbar! 

This is a real problem for me, can you please change this so that controls that are marked as not movable don’t appear in the pop-out menu and that they also don’t get affected by choosing ‘Reset’ from this menu?  After all, if they can't be customised by the user, and they are currently hidden, then it must be because the programmer want's it that way.  

These changes would make things more consistent and would give us programmers the kind of control we need over which parts of a toolbar the user can and can’t customise.   Thanks.




Replies:
Posted By: Oleg
Date Posted: 13 September 2005 at 2:40pm

1. Thank you good suggestion! Added

You can patch sources till next release.

in CXTPToolBar::BuildCustomizePopup

add

  if (pControl && ((pControl->GetFlags() & xtpFlagNoMovable) != 0))
  {
   continue;
  }

 

2. You can override virtual void CXTPToolaBar::Reset(); and hide controls again.

 



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


Posted By: brianh
Date Posted: 14 September 2005 at 5:35am
Thanks Oleg, that fixed it.   I have also derived my own toolbar class and overridden the Reset() method as you suggested, I now restore the hidden state for any non-customisable hidden controls after calling the base class version and that seems to work fine. Thanks again. 



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