Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Saving the RibbonBar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Saving the RibbonBar

 Post Reply Post Reply
Author
Message
cryo75 View Drop Down
Groupie
Groupie


Joined: 04 June 2006
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote cryo75 Quote  Post ReplyReply Direct Link To This Post Topic: Saving the RibbonBar
    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
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: 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
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.047 seconds.