Sign in Join
Wiki copytemporary

MultiDoc: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11### About
22
33MultiDoc is a Lazarus component to replace the standard MDI interface.
44
55This component permit to write pseudo-MDI application with Lazarus. It is not a real implementation of the MDI interface but it give to your application the capability to use many resizable sub-form.
66
77There are two components:
88
99- TMultiDoc : the main form docking area.
1010- TChildDoc : the child container with resizeable border and button.
1111
1212I do them with a [graphical software](/wiki-images/3/3c/Media%3AMultidoc_skychart.jpg) in mind but they are probably useful for a range of applications.
1313
1414### Screen Shot
1515
1616![](/wiki-images/b/b6/Multidoc_demo.png)
1717
1818### Author
1919
2020Patrick Chevalley
2121
2222### License
2323
2424Modified LGPL, see readme.txt
2525
2626### Download
2727
2828The component in version 0.1 and 0.2 and a demonstration program can be found on the [Lazarus-CCR sourceforge site](http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=176905).
2929
3030The component in version 0.3 and 0.3.1 can be found [here](http://br.geocities.com/hipernetjr/lmdi/index.html). *(link is broken, is someone having the file can upload somewhere?)* but could be find [here](http://br.oocities.com/hipernetjr/lmdi/index_ptbr.html) :-)
3131
3232Another download link of MultiDoc & LMDI (working in June 2017): <https://github.com/mehmetulukaya/laz-components>
3333
3434**Last available version from SVN:** A number of small fix where added to version 0.2 over the last years. If you use this version that not depend on LMDI you can get the most current version from the Skychart project.\
3535Type the following command:\
3636
3737 <nowiki>svn co http://svn.code.sf.net/p/skychart/code/tags/V36/skychart/component/multidoc multidoc</nowiki>
3838
3939**New Multiframe component:**
4040
4141Since 2012 I replace the use of this component in Skychart project by Multiframe.\
4242It work almost the same but use frames for the child windows, so it no more require the main TPanel trick.
4343
4444To get this component:\
4545
4646 <nowiki>svn co http://svn.code.sf.net/p/skychart/code/trunk/skychart/component/multiframe multiframe </nowiki>
4747
4848### Change Log
4949
5050- The Multiframe SVN [changelog](http://sourceforge.net/p/skychart/code/3050/log/?path=/trunk/skychart/component/multiframe) can be read on Sourceforge.
5151- Since 2012 this component is replaced by [Multiframe](http://sourceforge.net/p/skychart/code/HEAD/tree/trunk/skychart/component/multiframe/), using docked frames for the same functionality.
5252- The SVN [changelog](http://sourceforge.net/p/skychart/code/2149/log/?path=/trunk/skychart/component/multidoc) can be read on Sourceforge.
5353- Version 0.3.1 2008/01/01 Fixed the following:
5454 1. Moved to public section some properties, to avoid exceptions in design-time
5555- Version 0.3 2007/12/31 Fixed the following:
5656 1. This version was developed by Júnior Gonçalves and depends on the [[LMDI]] package
5757 2. Through of {\$IFDEF}'s the component compiles into Lazarus/Delphi unchanged
5858 3. Great move. Now the mouse not "escape" while the cursor is dragged (Tested in GTK2 (Windows) and Windows XP)
5959 4. ChildDoc is now derived from TFormPanel (see suite [[LMDI]])
6060 5. No more code necessary on each component to focus child form
6161 6. It is possible to change the "skin" of the title bar, according to the OS (see component TTitleBar)
6262- Version 0.2 2007/01/06 Fix the following:
6363 1. BorderWidth property not working
6464 2. Wrong button order
6565 3. Center the cursor to the title bar when moving the panel
6666 4. Gtk2 and FPC 2.1.1 compatibility
6767 5. Crash when closing a child using the close button
6868 6. Change licensing to modified LGPL
6969- Version 0.1 2006/01/20 First beta release.
7070
7171### Dependencies / System Requirements
7272
7373This component is exclusively derived from high level standard component (TPanel, TCustomSplitter, TSpeedButton). It must work on all the Lazarus platform without change.
7474
7575Tested on Linux and Windows.
7676
7777### Notes
7878
7979You are not limited to show the docking area in the full main form. You can place the TMultiDoc anywhere you want or use multiple one! A combination with a TNotebook may give something similar to a multi-desktop.
8080
8181### Installation
8282
8383- Compile and install multidocpackage.lpk
8484- Open the example demo/demomultidoc.lpi
8585
8686This example can be used as a skeleton for a new application.
8787
8888### Usage
8989
9090At design time:
9191
9292- On the application main form place a TMultiDoc.
9393- Create a child form with a main TPanel.
9494- Put all the object you want for the child to the panel, write the event, etc...
9595- Do not rely on some TForm event as this form is never show.
9696
9797At run time:
9898
9999- Create a new child from TMultiDoc.NewChild
100100- Create a child form with the new childdoc as owner.
101101- Assign the main panel to the Dockedpanel property.
102102
103103### Convert a Delphi MDI application
104104
105105Converting a MDI application is simplified by the availability of the same component for Delphi and Kylix.
106106
107107Convert first your application to MultiDoc in Delphi,then convert to Lazarus. This require some work but among the advantage you avoid the ugly XP border around your child forms.
108108
109109Replace the standard MDI function as below:
110110
111-`  MDIChildCount   -> MultiDoc1.ChildCount`\
112-`  ActiveMdiChild  -> MultiDoc1.ActiveObject`\
113-`                  or MultiDoc1.ActiveChild`\
114-`  MDIChildren[i]  -> MultiDoc1.Childs[i].DockedObject`\
115-`                  or MultiDoc1.Childs[i]`\
111+```text
112+ MDIChildCount -> MultiDoc1.ChildCount
113+ ActiveMdiChild -> MultiDoc1.ActiveObject
114+ or MultiDoc1.ActiveChild
115+ MDIChildren[i] -> MultiDoc1.Childs[i].DockedObject
116+ or MultiDoc1.Childs[i]
117+```
116118
117119The Delphi component is include in the package. Unzip multidoc-delphi.zip and install MultiDocD6.dpk or MultiDocK3.dpk.
118120
119121---
120122*From the Free Pascal wiki, page "MultiDoc", as it stood on 2017-06-19 after a change by Wp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
121123Category: Components
122124Category: Lazarus-CCR

Back to history