Print Page | Close Window

Magical 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=15780
Printed Date: 06 October 2024 at 2:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Magical Ribbonbar
Posted By: rdhd
Subject: Magical Ribbonbar
Date Posted: 04 December 2009 at 3:49pm
The other day I added some code to save a ribbon bar created by a customize command out to a file. I did that by creating (ok, copying sample code) a CXTPPropExchangeXMLNode for "Settings" and creating a "CommandBars" section. I created a CommandBars object (did not use the frame's command bars object) and a ribbon from that object. I did have to set the site to our frame (otherwise CJ crashes).
 
Today I have noticed that after we build our ribbon using code, that when I load the command bars using the CJ LoadCommandBars method, our ribbon gets a number of tabs added to it. The tabs have groups and controls on them. But none of these should be present. These tabs were present in my customized ribbon I previously saved to the xml file. The file no longer exists as I did that just for testing purposes.
 
I found that under the "UI" registry entry there is a "xxx-controls" entry and a "Controls" REG_SZ entry there. The entry points to my AppData\Roaming directory where there is a binary compressed zip file. CJ is opening that up and pulling in all this old/incorrect data and adding it to my ribbon. The entries on my ribbon we build in code are not repeated. Only items that were on the customized version that are not built in code are being added.
 
Note the file in AppData is NOT the same as the xml file I previously wrote out although it appears to contain the controls that existed at the point when I wrote it out.
 
Can someone tell me how I can do ribbon I/O to the xml file but only have CJ reload saved data when I specifically use the data exchange object (above) to read my ribbon from disk? Or at least explain exactly how CJ works vis-a-vis the saved binary file in appdata\roaming and the ribbon xml file, that I may or may not choose to load at runtime.



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