Recent

Author Topic: MDI comments  (Read 3060 times)

Kaller

  • Jr. Member
  • **
  • Posts: 73
MDI comments
« on: November 22, 2012, 06:37:07 am »
Hi
There has been a lot of discussion in the past about MDI and it is left out of Lazarus.  The main problem with MDI was that Microsoft did such a botch job initially and so it is riddled with annoying bugs that can be difficult to work around. That is one of the reasons that prompted Microsoft to deprecate it. Consequently some people claim that MDI is obsolete but in fact you can make a good case for that style of interface for many applications, especially when you have many forms that you want to manage and view at once. Since compatibility with older MDI applications seems hardly worth it, that means a re-design, not just a rewrite. I see some attempts have been made to simulate MDI using docking of forms for example.
The TDI in Lazarus IDE is quite a good model for TDI, and not having MDI in Lazarus forced me to rethink an application and I decided to roll my own TDI interface (Tabbed). Actually I am quite pleased with the result, and it did demonstrate to me that a lot of MDI can be done with TDI.
One useful feature that MDI delivers is the ability to view forms side-by-side.
(Textpad allows this and also creates groupings of tabs.) To achieve that in TDI I simply set up a split-screen option and a way to move tabs back and forth, rather than mess with groups.

What I learned from this though is that what is most important is a forms manager component, regardless of whether it is MDI ot TDI or whatever. An ObjectList seems to be a good basis for that, and I based mine on a TFPObjectList.
Being able to manage the list myself was a breath of fresh air compared to muddled mess of an MDI document index. It is pretty easy to find plenty of things the manager can do, such as keeping lists and statistics, and  listen to custom events from the forms, and it can fire its own events when the gui needs updating or menus need updates.

 





 

TinyPortal © 2005-2018