views:

267

answers:

6

In other words, if I want to write a winforms db application with an appearince like VS that has docked panels and also the ability to show/hide forms within some of those panels, how would I structure the interface? How would I have the ability to open several disparate forms at different times (with big data grids on them) while avoiding floating forms and also using memory efficiently? I want to avoid floating windows.

A: 

In both interfaces, multiple forms can be seen at the same time but in MDI, things float freely. In this sense, Visual Studio is a SDI.

erelender
From Wikipedia:"An IDE-style interface is distinguishable form of Multiple Document Interface (MDI), because all child windows in an IDE-style interface are enhanced with added functionality not ordinarily available in MDI applications. Because of this, IDE-style applications can be considered a functional superset and descendant of MDI applications.Examples of enhanced child-window functionality include:* Dockable child windows* Independent sub-panes of the parent window* GUI splitters to resize sub-panes of the parent window"How can I make independent sub-panes in an MDI?
Mitch
A: 

I think technically Visual Studio would be classed as an MDI.

The main form holds disparate controls. Each of these controls can then be docked as required etc. Visual Studio for example has a single control (with multiple tabs) to display the documents you edit. A single control with multiple tabs that holds (eg) Solution Explorer, Properties etc etc.

As a starting point to creating your own IDE style interface I would create a form with 5 panels, one docked to top, one to left, one to right, one bottom and one 'fill' Thats your starting point. Add splitter bars to allow the panels to be resized. Each panel can then hold a Tab control, and each tab holds a 'MdiBaseControl'

An MdiBaseControl can be whatever you want. So in VS terms you have things like SolutionExplorer, Properties, Breakpoints, FindResults etc etc. Each MdiBaseControl can be dragged from its current tab and dropped into any of the docked panels (which then adds it to the Tab control as a new tab)

PaulG
+1  A: 

Check out this article to build a VS like interface:

Visual Studio IDE like Dock Container

I haven't tried the component myself but it looks interesting.

Jay Riggs
+1  A: 

Visual Studio is definetly MDI

Neil N
+1  A: 

In the technical sense, Visual Studio is an MDI application whose document windows are anchored by tab navigation.

MDI refers to "multiple document interface," and refers to the fact that there are multiple documents open and visible inside a larger parent window.

In the modern application development realm, typically MDI has been frowned upon -- but that was the "old school" MDI, with the free-floating windows. Those are widely considered to be a usability nightmare.

On the other hand, MDI implemented as tabs inside a parent window is so successful from a UI consideration that even environment which didn't traditionally have MDI (EG, Mac OS) are implementing them.

In order to implement something like this, you can "roll your own," or you can use any of a variety of custom control/API packages which will allow you to easily develop tabbed-interface MDI apps. One of the last things I did with Infragistics NetAdvantage (before moving away from it) was a Visual Studio-inspired app, with docking sidebars, search results as a pane at the bottom, and all the primary data forms as tabbed MDI documents. (Indeed, WinForms is one of the few places Infragistics really shines.)

In terms of memory management, that will be on you. :)

John Rudy
A: 

I just noticed that Developer Express have some controls for building IDE-style interfaces.

Mitch