Print Page | Close Window

Serialize individual command bars

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=6547
Printed Date: 04 October 2024 at 9:32pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Serialize individual command bars
Posted By: venkyhyd
Subject: Serialize individual command bars
Date Posted: 02 March 2007 at 6:46am
Hello,
 
I have a Tabbed Toolbar in my application I would like to serialize the Tabbed Toolbar states (docking position and all) into .xml/.ini file. How can I serialize individual commandbars (like Tabbed Toolbars)? here the customization option for the tabbed toolbar is set to false.
 
But by using:
 

CXTPPropExchangeXMLNode px(FALSE, 0, _T("Settings"));

if (px.OnBeforeExchange())

{

CXTPPropExchangeSection pxCommandBars(px.GetSection(_T("CommandBars")));

XTP_COMMANDBARS_PROPEXCHANGE_PARAM param; param.bSerializeControls = TRUE; param.bSaveOriginalControls = FALSE;

GetCommandBars()->DoPropExchange(&pxCommandBars, &param);
-
-
}
would serliazie all the commandbars into same .xml file but here i want to serialize only one Tabbed Toolbar into different .xml file. Pls suggest
thnks



Replies:
Posted By: venkyhyd
Date Posted: 03 March 2007 at 2:15am
Hello Can Anyone suggest on this.....


Posted By: Oleg
Date Posted: 04 March 2007 at 3:59am
Hi,
 
Sorry, there is no way.
Why?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: venkyhyd
Date Posted: 05 March 2007 at 1:17am
Hello
 
I am able to do this by deriving a class from CXTPTabToolBar
 
and by calling the statements would serialize the tabbed toolbar dockstate.
CXTPPropExchangeXMLNode px(FALSE, 0, _T("IconPaletteSettings"));

if (px.OnBeforeExchange())

{// Save Current Dock Location:

CXTPPropExchangeSection pxIconPalette(px.GetSection(_T("IconPalette")));

this->GetCommandBars()->DoPropExchange(&pxIconPalette);

px.SaveToFile("C:\\TESTFILE.xml");

}
 
This would serialize the Tabbed Toolbar dock state but now I would like to serialize the contorls state (hidden / showed) present in the Tabbed Toolbar. Any Suggestion on serializing individual or group of controls present on the Toolbar of each Tab in tabbed Toolbar.


Posted By: venkyhyd
Date Posted: 06 March 2007 at 12:33am
Hello
 
 
Any Suggestions.....


Posted By: Oleg
Date Posted: 06 March 2007 at 1:45am
You can't serialize only one toolbar's controls. I can't understand why you need this. Make another toolbars not customizable if you don't want to save/restore all states.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: venkyhyd
Date Posted: 06 March 2007 at 3:39am

hello Oleg,

Thanks for your reply.

Here we have a situation where we are creating a tabbed toolbar on click of file new. Now in this tabbed toolbar we place some buttons. And when we select Add & Remove options and select hide/show (check or uncheck) in the popup bar. Now we want to retain the state of the Tabbed Toolbar and its controls wrt previous state.

Hope you got our requirement.

thnks 




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