Print Page | Close Window

Saving the RibbonBar

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=5100
Printed Date: 20 June 2025 at 3:42pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Saving the RibbonBar
Posted By: cryo75
Subject: Saving the RibbonBar
Date Posted: 20 September 2006 at 7:53am
Hi,
 
I'm saving the ribbonbar as follows:
 
    Dim oState As StateOptions
   
    Set oState = cbar.CreateStateOptions
    With oState
        .LoadSilent = False
        .SaveOnlyCustomized = False
        .SaveOriginalControls = True
        .SerializeDesignerControls = True
        .SerializeControls = True
        .SerializeImages = True
        .SerializeLayout = True
        .SerializeOptions = True
        .SerializeActions = True
    End With
   
    Dim sXML  As String
    Dim sFile As String
    Dim iFile As Integer
   
    sXML = cbar.SaveStateToXMLString("DesignerFile", oState)
   
    sFile = App.Path & "\Layout.xml"
    iFile = FreeFile
    'Kill sFile
    Open sFile For Binary As #iFile
    Put #iFile, , sXML
    Close #iFile
 
Then I load it as follows:
 
    Dim oState As StateOptions
    Dim oRib As RibbonBar
   
    Set oState = cbar.CreateStateOptions
    With oState
        .LoadSilent = False
        .SaveOnlyCustomized = False
        .SaveOriginalControls = True
        .SerializeDesignerControls = True
        .SerializeControls = True
        .SerializeImages = True
        .SerializeLayout = True
        .SerializeOptions = True
        .SerializeActions = True
    End With
   
    Dim sXML  As String
    Dim sFile As String
    Dim iFile As Integer
    sFile = App.Path & "\Layout.xml"
    iFile = FreeFile
    sXML = Space(FileLen(sFile))
    Open sFile For Binary As #iFile
    Get #iFile, , sXML
    Close #iFile
   
    cbar.LoadStateFromXMLString "DesignerFile", sXML, oState
    cbar.RecalcLayout
 
Problem! On loading the ribbonbar is not being displayed. How do I display it once loaded?
 
Thanks,
Ivan



Replies:
Posted By: Oleg
Date Posted: 20 September 2006 at 9:05am
Hello,
 
yes, there is no way to save ribbonbar - all methods only save its QuickAccess controls and  some options. you need to create it programmatically.


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