Switch GUI application behavior between SDI and MDI

I would convert my current windows into frames and put these frames with align=alClient into either mdi child windows or normal windows as configured.

But beware: I have never actually done this, so there might be problems that I don't know about.


At runtime set TForm.FormStyle either to fsNormal or fsMDIChild depending on if you want SDI or MDI.


Download the Jedi JVCL and install it and look at the Demos for JvDocking "docking in code". They do this exactly.

They mean that you do not actually use the FormStyle=fsMDIChild unless you want lots of problems. MDI is "emulated" when you need it by docking in code.

Do not convert windows into frames. This is a bad solution.

For an MDI-like environment, that does not have the MDI problems, use a docking solution (components either commercial or open source that support docking). I use JvDocking which is included in the JEDI JVCL, which is free and open source.

You use your forms in both "docked" and "undocked" (floating) modes, and this gives you a docked IDE look and feel (VIsual Studio and RAD Studio), and an undocked IDE Look and feel (RAD Studio in undocked, or classic delphi 7).

Tags:

Delphi

Mdi

Sdi