Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - [Solved] Ribbonbar SaveState issue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[Solved] Ribbonbar SaveState issue

 Post Reply Post Reply
Author
Message
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post Topic: [Solved] Ribbonbar SaveState issue
    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



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: 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
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post 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



Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post 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



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