![]()  | 
 
How save checked status button state? | 
 
    Post Reply  
   | 
  
| Author | |
   
   dimdar  
   
   Groupie  
   Joined: 11 July 2007 Status: Offline Points: 34  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: How save checked status button state?Posted: 04 October 2007 at 4:59am  | 
 
| 
   
    Hi, I have stupid problem with command bar customization: If I check some button and I save command bar (SaveStateToXMLString method) when I reload it the checked button status was lost. I create tool bar by code the first time that my application run or if I can’t load xml file with last configuration. My application remembers correctly a new button added by user or moved but not the check state      objStateOption.LoadSilent = True     objStateOption.SaveOnlyCustomized = False         objStateOption.SaveOriginalControls = True     objStateOption.SerializeDesignerControls = False     objStateOption.SerializeControls = True     objStateOption.SerializeImages = False     objStateOption.SerializeLayout = True     objStateOption.SerializeOptions = True Any idea? Regards,  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 04 October 2007 at 6:25am | 
 
| 
   
    
   Hello,
 
   
  its designed to not save/restore Checked/Enabled states. 
 | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   dimdar  
   
   Groupie  
   Joined: 11 July 2007 Status: Offline Points: 34  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 04 October 2007 at 6:49am | 
 
   
   
 I Think this is a limit. The xml can store image but not Checked/Enable states, why don't add this in the StateOptions object?  
   ![]()  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 05 October 2007 at 4:15am | 
 
| 
   
    Hi, 
CommandBar buttons show _state of application_,  
it will be bad design to save state of application in CommandBars XML. You need add variables that wil be saved/restored and update state of commandbars from this variables. 
    | 
 |
| 
   
     
     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  |