Print Page | Close Window

[Solved] Ribbonbar SaveState issue

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=18494
Printed Date: 06 October 2024 at 12:31am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [Solved] Ribbonbar SaveState issue
Posted By: Willowmaster
Subject: [Solved] Ribbonbar SaveState issue
Date Posted: 04 June 2011 at 10:36am
Hi all,
 
I'm using the Suitpro V15.0.2 trail components to see if we can integrate the new 2010 theme  into our application. We use the saving mechanism to a XML string, but when loading the string back the Ribbon is not loaded properly. I'm wondering if this is something wrong with my code or with the saving mechanism of Codejock.
 
If you use the RibbonSample and replace the Else part of the Case in function frmMain.Commandbars.Execute with the following code the ribbon has no controls anymore except for the qat:

            Dim objOptions As XtremeCommandBars.StateOptions
            Dim strLayout As String
            Set objOptions = frmMain.CommandBars.CreateStateOptions
            objOptions.LoadSilent = True
            objOptions.SaveOnlyCustomized = False
            objOptions.SaveOriginalControls = True
            objOptions.SerializeActions = True
            objOptions.SerializeControls = True
            objOptions.SerializeDesignerControls = True
            objOptions.SerializeLayout = True
            objOptions.SerializeOptions = True
            strLayout = frmMain.CommandBars.SaveStateToXMLString("Test", objOptions)
            frmMain.CommandBars.DeleteAll
            Call frmMain.CommandBars.LoadStateFromXMLString("Test", strLayout, objOptions)
            MsgBox Control.Caption & " clicked", vbOKOnly, "Button Clicked"
 
Start the program and click on File->Save to activate the code.
Does anyone have a clue? It has no use for us to buy the new version if we can't save the ribbon.
 
Thanks in advance.


-------------
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0






Replies:
Posted By: Oleg
Date Posted: 06 June 2011 at 6:51am
Hi,

SaveState/LoadState is used to save and load user changes. in Ribbon user can change only QAT.

If you add Ribbonbar.Customizable = True,  it can be changed.


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


Posted By: Willowmaster
Date Posted: 06 June 2011 at 7:07am

Hi Oleg,

The documentation states that the SaveOriginalControls saves all the controls from a Commandbar. Does this mean that the Ribbonbar is not a Commandbar?



-------------
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0





Posted By: Willowmaster
Date Posted: 07 June 2011 at 9:56am
In other words. This is by design but not stated in the documentation as such?
We are taking a different approach in our program to avoid this problem, but I'm still curious.

-------------
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0





Posted By: Oleg
Date Posted: 08 June 2011 at 5:35am
Yes, Ribbonbar is exception and SaveOriginalControls don't change it without Customizable = True.

-------------
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