We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MainFrameBarManager Save/Load with runtime created bar and item

Thread ID:

Created:

Updated:

Platform:

Replies:

25404 Feb 25,2005 04:16 PM UTC Mar 2,2005 06:58 PM UTC WinForms 13
loading
Tags: Tools
Martin Bonneville
Asked On February 25, 2005 04:16 PM UTC

Hi, All items and toolbars are created at runtime. The save and load do not work. But if I created manually some toolbars at runtime... when I restart the application, the toolbar reappear but no item in it. What I need to do ? Best regards, Martin

Administrator [Syncfusion]
Replied On February 25, 2005 05:18 PM UTC

Hi Martin, Are you able to provide a sample that demonstrates this problem? Regards, Gregory Austin Syncfusion Inc.

Martin Bonneville
Replied On February 25, 2005 06:26 PM UTC

Hi Gregory, I can''t upload file with the attach button. The popup appear but never end loading ! :-( Do you have an E-mail where I can send you my test application ? Regards, Martin

Administrator [Syncfusion]
Replied On February 25, 2005 06:47 PM UTC

Hi Martin, You can send me the attachment directly at gregorya@syncfusion.com Regards, Gregory Austin Syncfusion Inc.

Martin Bonneville
Replied On February 25, 2005 06:59 PM UTC

Hi Gregory, Mail sent... Regards, Martin

Administrator [Syncfusion]
Replied On February 25, 2005 08:17 PM UTC

Hi Martin, To do what I think you''re trying to do, you''ll want to manually Load and Save your Bar state with MainFrameManager.LoadBarState and MainFrameBarManager.SaveBarState. Currently the loading of your bar state is failing because it occurs before you create the BarItems, so it can''t add them to the Bar. Regards, Gregory Austin Syncfusion Inc.

Martin Bonneville
Replied On February 25, 2005 08:59 PM UTC

Hi Gregory, Can I use the automatic save and load manualy? If yes, can you give me an example of the load sequence? Thank Best regards, Martin

Martin Bonneville
Replied On February 28, 2005 06:42 PM UTC

Hi Gregory, Do you have an example for me ? Regards, Martin

Administrator [Syncfusion]
Replied On March 1, 2005 05:45 PM UTC

Hi Martin, Please refer to the test sample attached. It shows you how you could load/save menu state information manually using the MainFrameBarManager''s LoadBarState/SaveBarState methods. 1. Run the sample 2. Press the "Add Menus" button 3. Float the toolbar 4. Press "Save" button to save the menu state information 5. Close the application 6. Reload the application 7. Press the "Load" button to restore the menu state information You will see that the saved menu state information is correctly restored. Let me know if you need further assistance. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On March 1, 2005 05:48 PM UTC

Hi Martin, After step (6) above, press the "Add Menus" button again to recreate the menus before movingto step (7). Note that the LoadBarState/SaveBarState methods can only restore/save state information and cannot create/delete the menu bars or items. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Martin Bonneville
Replied On March 1, 2005 06:24 PM UTC

Hi Guru, Thank for you sample. I try it in my application, all work fine for saving state of "default" bars and items. If I add items, menus (or check the Large icons checkbox) with customization dialog, all the customization is lost. I need to do something special to save the user customization ? Best regards, Martin

Administrator [Syncfusion]
Replied On March 2, 2005 03:40 PM UTC

Hi Martin, I''ve done some more research into this and XPMenus only supports loading customization data during the initialization of the MainFrameBarManager. You should still be able to create BarItems at Runtime, but you''ll have to create them in the Constructor. I apologize for the confusion. Please let me know if you have any further questions. Regards, Gregory Austin Syncfusion Inc.

Martin Bonneville
Replied On March 2, 2005 06:24 PM UTC

Hi Gregory, The loading work fine with "default" bars and items. (bars and items always created by the application) Only the custom bars (created by user at runtome) are not saved or loaded. Then what you say is: Custom bars can be loaded only in form constructor (just after InitializeComponents) ? Best regards, Martin

Administrator [Syncfusion]
Replied On March 2, 2005 06:58 PM UTC

Hi Martin, I believe that you would need to remove the MainFrameBarManager initialization code from InitializeComponent and place that in the same place where you add your BarItems. The best place for this would be the constructor, but it might work in in the Load event handler. Regards, Gregory Austin Syncfusion Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;