lazarus MDI application. lazarus / 21-General ---------------------------------------------------------------------- BSaidus · 2024-06-04 16:53 Hello, Just wonder about support for MDI on lazarus. Thank you. ---------------------------------------------------------------------- Dzandaa · 2024-06-04 17:06 Hi, What is the problem with MDI? I use Lazarus 2.2.4 with FPC 3.2.2 and it works fine on Windows and Linux... Perhaps your version is outdated? B-> ---------------------------------------------------------------------- Thaddy · 2024-06-04 17:34 The problem with MDI as a user interface paradigm was deprecated by MS in 1997-2000 in favor of an SDI interface, with some provisions, e.g. the availability of docking instead. In other words it is not recommended to use an MDI type interface in modern GUI design, but MS violated its own rules for many years. This is Microsofte current answer from today:Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Microsoft's decision to deprecate MDI (Multi-Document Interface) in the late 1990s was influenced by several factors: 1. **Usability and User Experience**:   - MDI interfaces could become cluttered, especially when users opened numerous documents within a single application frame.   - Managing multiple windows within a parent window could lead to confusion and hinder productivity.   - SDI (Single-Document Interface) offered a simpler, more straightforward experience for users. 2. **Shift Toward Simplicity**:   - Microsoft aimed to simplify its user interfaces.   - SDI, with its one-document-per-window approach, aligned better with this goal.   - The trend was toward cleaner, less complex interfaces. 3. **Technical Challenges**:   - MDI required more complex code to manage child windows, handle focus, and maintain state.   - SDI was easier to implement and maintain. 4. **Platform Independence**:   - Microsoft wanted to create applications that could run on different platforms (Windows, Mac, etc.).   - SDI was more consistent across platforms, making it a better choice for cross-platform development. 5. **Industry Trends**:   - Other software companies were also moving away from MDI.   - Web-based applications and tabbed interfaces gained popularity. In summary, Microsoft deprecated MDI due to usability concerns, a desire for simplicity, technical considerations, and alignment with industry trends. SDI became the dominant paradigm, but MDI still exists in legacy applications and specialized tools where managing multiple documents within a single frame remains essential. But - as I wrote above - MS still uses it...over 25 years later.. ---------------------------------------------------------------------- domasz · 2024-06-04 17:39 And Microsoft decided against MDI because according to their research users are retarded and MDI is confusing for them. For example they tend to move child windows outside the visible area. The suggested solution is to use tabs instead of MDI. ---------------------------------------------------------------------- zeljko · 2024-06-04 17:44 Quote from: BSaidus on June 04, 2024, 06:53:28 pmHello, Just wonder about support for MDI on lazarus. Thank you. win32 on windows and qt/qt5/qt6 widgetsets have MDI implemented on linux, mac and windows. ---------------------------------------------------------------------- Thaddy · 2024-06-04 17:45 Quote from: domasz on June 04, 2024, 07:39:31 pmThe suggested solution is to use tabs instead of MDI. Even that is out-of-date: The current paradigm is context sensitive UI, where useless elements in a certain context are hidden - in the strictessed sence - from the user. ---------------------------------------------------------------------- Thaddy · 2024-06-04 17:50 Quote from: domasz on June 04, 2024, 07:39:31 pm users are retarded That is firmly based on fact, not opinion. Ever worked in a call- center?  Or online support? OTOH, Microsoft never intended to improve user interfaces to keep the cost of their support staff down.. ---------------------------------------------------------------------- BSaidus · 2024-06-04 17:56 I asked about MDI, because I read some time ago, that support for it in lazarus is not completely done ( work in progress ). I constate that It works well now ( from your answers ). I'll test if it feet my needs. Thank you. ---------------------------------------------------------------------- domasz · 2024-06-04 18:58 Quote from: Thaddy on June 04, 2024, 07:50:37 pmThat is firmly based on fact, not opinion. Ever worked in a call-center?  Or online support? Didn't have that pleasure But I have a feeling users are dumber than they were. I kinda see phrases of dumbing down: DOS -> Windows 95 -> Windows XP -> Windows 10 I mean average Windows 10 user is dumber than XP user by the same amount average XP user was dumber than 95 user. ---------------------------------------------------------------------- marcov · 2024-06-04 19:42 Quote from: Thaddy on June 04, 2024, 07:50:37 pmThat is firmly based on fact, not opinion. Ever worked in a call-center?  Two and an half years of Chello support. You never will view (l)users in the same vein again. ---------------------------------------------------------------------- GAN · 2024-06-04 21:37 Quote from: domasz on June 04, 2024, 07:39:31 pmusers are retarded It's the main reason I abandoned programming: users. ---------------------------------------------------------------------- VisualLab · 2024-06-04 22:23 Quote from: Thaddy on June 04, 2024, 07:50:37 pmQuote from: domasz on June 04, 2024, 07:39:31 pm users are retarded That is firmly based on fact, not opinion. Ever worked in a call- center?  Or online support? OTOH, Microsoft never intended to improve user interfaces to keep the cost of their support staff down.. And programmers lazy? "strange, it works for me" ---------------------------------------------------------------------- Thaddy · 2024-06-05 06:04 Quote from: BSaidus on June 04, 2024, 07:56:11 pmI asked about MDI, because I read some time ago, that support for it in lazarus is not completely done ( work in progress ). My best guess is that it will probably only will work acceptably in Win32.. MDI api's are complex. I - and others - implemented an MDI api for KOL and that also works on win64, but note that I reverted to faking the official MDI api, and abandoned implementation over the MS Api, because that was easier and faster to implement. Still MDI, though, just achieved by other means. What we did is basically make the mdi client forms owned by the mdi form and restricted their bounds to the parent form's clientrect, subs. manipulate z order in code so the mdi  form was always the background. That is much, much easier than working with the ms MDI api. ---------------------------------------------------------------------- Dzandaa · 2024-06-05 08:35 Hi, @BSaidus Here is a template to create MDI applications: Drop the "MDI Form"directory in you templates directory and you'll have a new entry in "File->New project from template" called: "MDI Application". Fill the Dialog and you'll have a MDI application Skeleton. For Linux read the comment in the "*MainForm*".pas See:  https://wiki.lazarus.freepascal.org/Project_Templates  if you don't know how to use "Project Templates". Have a nice day. B-> ---------------------------------------------------------------------- Fred vS · 2024-06-05 10:09 MSEgui has native docking forms and MDI, for Windows and Unix. ---------------------------------------------------------------------- loaded · 2024-06-05 10:39 Quote from: domasz on June 04, 2024, 08:58:11 pmBut I have a feeling users are dumber than they were. I kinda see phrases of dumbing down: DOS -> Windows 95 -> Windows XP -> Windows 10 I mean average Windows 10 user is dumber than XP user by the same amount average XP user was dumber than 95 user. I do not agree. There are young people around me like monsters who use Win10 and Win11. My experience with MDI in windows; In Delphi, this job is very easy to do, but in Lazarus, it is very difficult. If you are at the beginning of your journey, I recommend you consider a different design. ---------------------------------------------------------------------- Thaddy · 2024-06-05 14:54 Quote from: Fred vS on June 05, 2024, 12:09:17 pmMSEgui has native docking forms and MDI, for Windows and Unix. msegui does the same as we did for KOL. So on Windows it is NOT native in the sense of using the proper MDI API. Mimic it. ---------------------------------------------------------------------- Fred vS · 2024-06-05 15:47 Quote from: Thaddy on June 05, 2024, 04:54:27 pmQuote from: Fred vS on June 05, 2024, 12:09:17 pmMSEgui has native docking forms and MDI, for Windows and Unix. msegui does the same as we did for KOL. So on Windows it is NOT native in the sense of using the proper MDI API. Mimic it. Hello Thaddy. You are right, “native” is not the right word. Mayybe better this: “MSEgui has by design easy docking forms and MDI, for Windows and Unix."