![]()  | 
 
Disable customisation problem | 
 
    Post Reply  
   | 
  
| Author | |
   
   brianh  
   
   Groupie  
   Joined: 30 April 2004 Location: United Kingdom Status: Offline Points: 83  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Disable customisation problemPosted: 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.  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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)) 
 2. You can override virtual void CXTPToolaBar::Reset(); and hide controls again. 
  | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   brianh  
   
   Groupie  
   Joined: 30 April 2004 Location: United Kingdom Status: Offline Points: 83  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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.   
    | 
 |
![]()  | 
 |
    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  |