AD
Administrator
Syncfusion Team
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.
MB
Martin Bonneville
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
AD
Administrator
Syncfusion Team
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.
MB
Martin Bonneville
February 25, 2005 06:59 PM UTC
Hi Gregory,
Mail sent...
Regards,
Martin
AD
Administrator
Syncfusion Team
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.
MB
Martin Bonneville
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
MB
Martin Bonneville
February 28, 2005 06:42 PM UTC
Hi Gregory,
Do you have an example for me ?
Regards,
Martin
AD
Administrator
Syncfusion Team
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.
AD
Administrator
Syncfusion Team
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.
MB
Martin Bonneville
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
AD
Administrator
Syncfusion Team
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.
MB
Martin Bonneville
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
AD
Administrator
Syncfusion Team
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.