I am trying to save the MDI state when closing the application and load it when opening. Like FireFox, it opens all the web pages last time when you close the application. I've noticed that UltraTabbedMdiManager have methods like SaveAsXml and LoadFromXml.What is contained in the saved XML file?
What do I need to do if I want to open the last visited pages like FireFox? Thanks.Mike
Another question: Our application uses different managers (Toolbar, Dock, and MDI), is it possible to save the setting in a single file instead of multiple ones.What is the industrial standard to do that?
Thanks.
So LoadTabbedMdiLayout would work properly if I create handler for StoreTab and RestoreTab?
The reason LoadTabbedMdiLayout does not work for me is because I save the mdi child forms in a separate file?
I must apologize: I was thinking about how the dock manager loads the layout and I assumed the tabbed mdi manager worked the same way, so I am sorry for giving bad advice. I have checked with someone more familiar with this component, and there are properties and events built in specifically for what you are trying to do. Handle the StoreTab event on the tabbed mdi manager. When a tab is going to be serialized to the XML file, this event will be fired for each tab. In your case, when you handle this event, set the PersistedInfo of the tab for which the event is being fired to the file name associated with the tab. For deserialization, handle the RestoreTab event. This event will be fired for each tab which was serialized. In the handler, you can get the PersistedInfo for the tab and create a Form (or use an existing Form) to use for the tab. Set the Form on the Form property of the event arguments.
I tried to save child MDI forms in a separate file and successfully load them within MainForm's OnLoad method.But the LoadTabbedMdiLayout does not seems to work, even if i put it after loading all the child MDI forms. Even worse, it messes up the layout.I also tried to put LoadTabbedMdiLayout in OnLayout method in the MainForm, and it behaves the same.
Do you have any idea what is going wrong? and how can i make this work?
mike2008 said:In fact, all I want to save for each form is the file name to initialize it. Is it possible to tag objects (e.g., the list of file names in this case) to the UltraTabbedMdiManager? Is it worth doing that?
No, because the load operation would load in the tag values and try to find the mdi child forms all before returning. There would be no way to intervene after the tag values were loaded to open the forms before the load operation attempted to find them. I would recommend using a separate file for this.
mike2008 said:>to maintain the tab groups into which the user has organized the mdi child formsThe only think i can think of is to switch between normal MDI and tabbed MDI. Anything else user acn do to organize child forms?
Just like in VS, the user can drag the tabs down or to the side to form new tab groups. They can also form new tab groups by right-clicking the tab and selecting 'New Horizontal Tab Group' or 'New Vertical Tab Group'