Using the MDI Workspace

Topics: CAB & Smart Client Software Factory
Sep 16, 2005 at 6:53 AM
originally posted by: Revelation

I have two questions regarding use of the MDI workspace:

First, is it possible to put an MDI workspace inside a SplitContainer or other panel? Or, alternatively, can I permanently dock one instance of an MDI form? What I would like to acheive is a fixed panel docked against the left edge of the client area with links, another panel against the top with special status info, and all other windows floating in the remaining area. I'm open to doing this any way possible as long as I get the desired look.

Second, is there a way to have a smartpart expand to fill the entire MDI child window? For instance, one of my workitems uses a browser control. I'd like the browser to fill that form window. I have the browser control set to fill the user control, but the user control doesn't fill the MDI client window. This is probably a simple setting somewhere, but I can't find it.

Thanks in advance,
Sep 17, 2005 at 11:42 AM
originally posted by: Revelation

Ok, I figured out the first part. While I can't add the MdiWorkspace to a panel, I can add other panels to the main form. That solves my first problem.

But I still don't know how to get a smatpart to fill an MDI child window... Anybody?
Sep 17, 2005 at 12:52 PM
originally posted by: kljones16

Can you use the ParentForm property of the User Control to maximize the form?
Sep 20, 2005 at 8:18 AM
originally posted by: Revelation

Thank you for the reply. It's not the form I want to maximize, it's the contents of the form. I want the contents of the form to fill the form.

Your suggestion, however, got me thinking of how I can accomplish this. I've added code to every view (smartpart) to set its Dock property to Fill in the constructor. Although it works, it doesn't feel right to me for some reason. the Dock property is not exposed in the IDE for user controls, probably because it should be the responsibility of its container to decide this. I would have hoped there was a setting in the MdiWorkspace (or somewhere in CAB) to indicate the docking behavior of its contents. Maybe the final release will have something like this. If not, I can live with this solution.