Print Page | Close Window

How save checked status button state?

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=8292
Printed Date: 21 December 2024 at 10:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How save checked status button state?
Posted By: dimdar
Subject: How save checked status button state?
Date 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 . I think I have an error when I create State Options, this is my setting:

 

    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,




Replies:
Posted By: Oleg
Date Posted: 04 October 2007 at 6:25am
Hello,
 
its designed to not save/restore Checked/Enabled states.
 
 


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


Posted By: dimdar
Date Posted: 04 October 2007 at 6:49am
Originally posted by oleg oleg wrote:

Hello,
 
its designed to not save/restore Checked/Enabled states.
 
 
 
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?


Posted By: Oleg
Date 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



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