Forum > LCL

Please tell me what components are there for MDI

(1/2) > >>

I am writing a code editor application, I need to use MDI. Please tell me what are the components for this and what are their pros and cons?

Thaddy: for pro's and con's. It is at this point in time usually considered bad design, although wikipedia not fully reflects this. Some call MDI legacy, but that is not entirely true.
Lazarus has some MDI support, but not really cross-platform, I believe.
If you are on Windows only, I have some code as example, though.
If that is not enough? Use SDI, not MDI. SDI has much better cross-platform support.
That said, I use MDI on Windows myself for some legacy applications, because users expect it.
Usually, for an editor, it is better to use a tabbed interface and/or maybe use anchor docking.
The latter is well supported by Lazarus and also looks quite a bit more modern.
Anchor docking is actually SDI but looks like MDI when well used/designed.

So my professional opinion is to generally avoid MDI and I would go for anchor docking. But there are some cases where MDI is still relevant, not from the perspective of the programmer but that of the user.
It is an important design decision, so think it through carefully!

(Side note: My mother was a pretty avid Delphi programmer until her death 3 years ago at 89. She preferred MDI for her database applications. I still have her laptop with all her code on it.. and not bad at all, compared to some things we see here. She used to teach computer literacy to older people and used to complain why these old people did not understand computers: she was MUCH older than most of them...)

I'm making a cross-platform application and I need it to run on both Linux and Windows. This is the main condition.
I need to use exactly MDI, since many windows can be opened and the main functions will be in the main menu.
So far I have only found MultiDoc( , but I don't know how cross-platform it is and maybe there is something better.

Do you realize that the Lazarus IDE itself, with all its menu options, is an SDI interface? And NOT MDI?
I thought you would have thought it through by now? Anyway, it is your decision and I can only give advice from experience. MDI cross-platform is a challenge. (read: the road to nowhere)
But it can be done if you insist. For the readers: I never bashed MDI, just merely pointed out my opinion and some practical remarks.

Fred vS:

If you want a widgetset that has docking forms and MDI at "root" (without the need to install external components), you may envisage to try MSEgui:

His docking and MDI are working perfectly.


[0] Message Index

[#] Next page

Go to full version