Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - How save checked status button state?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How save checked status button state?

 Post Reply Post Reply
Author
Message
dimdar View Drop Down
Groupie
Groupie
Avatar

Joined: 11 July 2007
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote dimdar Quote  Post ReplyReply Direct Link To This Post 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 . 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,

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 04 October 2007 at 6:25am
Hello,
 
its designed to not save/restore Checked/Enabled states.
 
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dimdar View Drop Down
Groupie
Groupie
Avatar

Joined: 11 July 2007
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote dimdar Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
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.188 seconds.