Print Page | Close Window

RibbonBar load and Save issus

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=19903
Printed Date: 22 November 2024 at 9:15pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: RibbonBar load and Save issus
Posted By: Ssytems
Subject: RibbonBar load and Save issus
Date Posted: 28 June 2012 at 8:06pm
Hi, this problem is driving me crazy and I can't seem to find a solution in the forum:
I have created a really beautiful commandbar ribbon for my app using the designer.
After spending many days doing this, I thought being able to use it in my app would be easy and straight forward. But not. Here's what I am trying to do:
 
'Load the bar from designer file
(1) cmdBar.LoadDesignerBars App.Path & "\res\_Ribbon.xcb", Me
'This works beautifully. However, I don't want to distribute the designer file with my app...so using the other save and load features, I have converted the xcb file to xml, and even save in registry using
(2) cmdBar.SaveCommandBars App.CompanyName, "MyApp", "_RibbonLayout"
and
(3) cmdBar.SaveStateToXMLString("DesignerFile", myStateOptions)
' Then I try to load it in 2 different ways:
(4) cmdBar.LoadStateFromXMLString "DesignerFile", myXMLLayout, myStateOptions
OR cmdBar.LoadCommandBars App.CompanyName, "MyApp", "_RibbonLayout.
 
None of this works. It just wont load. If I load using the xcb file, it is fine. I can see data in both the XML and registry after the save. So what gives?
 
so my question:
How can I use the great ribbon that I created and saved as .xcb and .xml file in my app without loading it from the .xcb file all the time when my app is distributed? I want to load the .xcb file the first time, save the ribbon to either the registry and then install the registry at the client, then load from registry after that. I don't want to have to re-write the whole ribbon in code after spending all that time designing it. Very frustrating. Please help.



Replies:
Posted By: SuperMario
Date Posted: 05 July 2012 at 9:59am
Just Right-click CB on your form and choose Load CommandBars (*.xcb).  Then you will not need the file any more.



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