![]() |
Saving the RibbonBar |
Post Reply ![]() |
Author | |
cryo75 ![]() Groupie ![]() Joined: 04 June 2006 Status: Offline Points: 49 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |