Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switch GUI application behavior between SDI and MDI

Tags:

delphi

mdi

sdi

I currently have an SDI application that is build with Delphi 7, I want the final user to choose the type of interface between SDI and MDI at runtime. my question is how can I change the behavior of the application between SDI and MDI at runtime?

Currently I know a couple of applications build with delphi that allow this: EMS SQL Manager and TOAD.

alt text

thanks in advance.

like image 911
Salvador Avatar asked Jan 29 '10 14:01

Salvador


People also ask

What is difference between SDI and MDI?

SDI applications allow only one open document frame window at a time. MDI applications allow multiple document frame windows to be open in the same instance of an application.

What is MDI and SDI with example?

Visual Studio is an MDI application. SDI (single document interface). SDIs can open only a single document at a time. Notepad is an example of an SDI application—if you want to open two text files at once, you need to fire up two instances of Notepad. MFI (multiple frame interface).

What is SDI and MDI in VB?

Multiple document interface (MDI) applications permit more than one document to be open at a time. This is in contrast to single document interface (SDI) applications, which can manipulate only one document at a time. Visual Studio .

Why do you use MDI in Visual Basic?

Multiple-document interface (MDI) applications enable you to display multiple documents at the same time, with each document displayed in its own window.


2 Answers

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).

like image 171
Warren P Avatar answered Nov 01 '22 11:11

Warren P


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.

like image 33
dummzeuch Avatar answered Nov 01 '22 10:11

dummzeuch