![]() |
Magical Ribbonbar |
Post Reply ![]() |
Author | |
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 921 |
![]() ![]() ![]() ![]() ![]() 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.
|
|
![]() |
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 |