Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
332
Create forms in new Tabs/Groups programmatically
posted

I have a MDIManager which is used to host various forms/pluggin-modules from seperate assemblies; (dll, exe, etc.) But when I attempt to use the Serialization and Deserialization methods of the MDIManager, it seems my child forms arn't being stored and reloaded. From the example help/doc - "Save and Restore a Tabbed MDI Layout", it uses the Save/Load from binary; but i also tried using "from xml" and through examining the xml file found that none of the obvious details of my forms are stored. In anycase, I've already resorted to saving the layout through xml manually, by iterating through the TabbedMdiMan.TabGroups[x].Tabs, etc. However the question is how do I manually load the forms back?

I am able to read my own xml file (obviously), but i need to know how to create new TabGroups, Tabs, a new tab assigned to specific group, and attach a new form to that tab.

In my application, we use Assembly.LoadFrom(~), but a simple example using local assemblies would do just fine - i'm sure i can figure out the rest.

regards,

-kel-

Parents
  • 332
    posted
    Ahh, it seems i may have overlooked a key implementation detail - which is to handle the "StoreTab" and "RestoreTab" events. Now everything seems working; but I still have another question. From the RestoreTab eventhandler, I am unable to restore the forms/tabs to their original group settings. For example, when i saved the layout, I had a horizontal splitter group (top and bottom), and in each area are their corresponding forms/tabs. But when i restore the tabs, all forms/tabs appear under a single group, without the horizontal splitter. Any ideas? regards, -kel-
Reply Children