views:

1389

answers:

4

I'm developing a multi-document application. Currently it uses MDI which is quite convenient for me (as a developer) as well as for users I believe. However there is one "against" - I haven't found a solution to quickly load many child windows (each time the window is created and maximized to fill the parent's area, there is an 'animation' of resizing which takes a lot of time) so far, thus I'm considering switching back to tabbed interface (which requires some more work, I need to "embed" a form to the page sheet, as there are many "kinds" of forms available, some for editing text documents, some for other objects)...

So, what is your opinion? Should I use MDI or tabbed interface?

+6  A: 

MDI was developed back in the Windows 3 days (or possibly earlier?) and isn't well-supported these days. If you need multiple documents with different forms, I'd recommend using a tabbed interface. Use frames instead of forms, and create the new tabs and place a frame on it, aligned alClient.

Mason Wheeler
Sorry but I think you are wrong.MDI was deprecated by Microsoft some years ago. But Microsoft is using it again for example in Office 2007 where you can see a classical MDI system.
Francis Lee
No, they're not. Office 2007 uses a proprietary framework, and uses exactly **none** of the built-in WinAPI MDI functionality. It may ++appear++ to be MDI, but it isn't.
Ken White
Exactly. Use DOCKING like JvDocking. This "LOOKS LIKE" MDI but is not using the MDI formStyle and the Win31 era code, which, by the way, is buggy.
Warren P
+6  A: 

To avoid the resizing animation (and thus the delay) of new MDI child windows, send a WM_SETREDRAW message to the parent TForm's ClientHandle property before creating your child windows, and then send it again when you are done, ie:

Self.Perform(WM_SETREDRAW, False, 0);
... create child windows as needed ...
Self.Perform(WM_SETREDRAW, True, 0);
Windows.InvalidateRect(Self.ClientHandle, nil, True);
Windows.UpdateWindow(Self.ClientHandle);
Remy Lebeau - TeamB
it goes faster, but ... I can still see the animation! :o
migajek
+2  A: 

Question: is it important that users be able to see more than one of your embedded forms or frames at a time? If not, certainly go for tabs.

Tabs make it easier to navigate and to see what you have available. But with standard PageControl you can only see one tab at a time - there's no "tiling" or "cascading". Problems begin for example when users need to drag things from one tab to another. It can be done, of course, but is not as convenient - because this time users do not see where they are dragging something to.

To overcome this limitation you'd have to look at a docking UI, which adds complexity, but could give you tabs as well as being able to tile them.

moodforaday
actually there are tabs anyway. They are representing available windows. Each window has it's own tab item, but it's not pagecontrol, just empty tab which - when activated - brings the attached form to front.
migajek
+3  A: 

There are certainly more negative points to MDI than the one you cite. You can find discussions on this in the Wikipedia, and even in the Windows Interface Guidelines as well. MDI has been deprecated now for years. Microsoft itself isn't using MDI in its "standard" form for any of its big applications any more, they often provide just a MDI emulation together with other UI styles.

If your program is for users with multiple screens both MDI and a tab-based UI have the problem of limiting the document windows to the insides of the parent window.

With a proper application design you don't really have to decide between MDI and tab-based UI. Let your users decide which UI they are most comfortable with, and which fits their working style best. Allow for multiple independent top-level document windows (either in one application instance or in multiple) as well. It can be as easy as creating frame classes for your documents, and deciding at runtime whether to embed them into a tab control, into a MDI child window, or into a top-level window.

mghie