MultiDoc
│
Deutsch (de) │
English (en) │
español (es) │
português (pt) │
About
MultiDoc is a Lazarus component to replace the standard MDI interface.
This 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.
There are two components:
- TMultiDoc : the main form docking area.
- TChildDoc : the child container with resizeable border and button.
I do them with a graphical software in mind but they are probably useful for a range of applications.
Screen Shot
Author
License
Modified LGPL, see readme.txt
Download
The component and a demonstration program can be found on the Lazarus-CCR sourceforge site.
Change Log
- Version 0.2 2007/01/06 Fix the following:
- BorderWidth property not working
- Wrong button order
- Center the cursor to the title bar when moving the panel
- Gtk2 and FPC 2.1.1 compatibility
- Crash when closing a child using the close button
- Change licensing to modified LGPL
- Version 0.1 2006/01/20 First beta release.
Dependencies / System Requirements
This component is exclusively derived from high level standard component (TPanel, TCustomSplitter, TSpeedButton). It must work on all the Lazarus platform without change.
Tested on Linux and Windows.
Notes
You 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.
Installation
- Compile and install multidocpackage.lpk
- Open the example demo/demomultidoc.lpi
This example can be used as a skeleton for a new application.
Usage
At design time:
- On the application main form place a TMultiDoc.
- Create a child form with a main TPanel.
- Put all the object you want for the child to the panel, write the event, etc...
- Do not rely on some TForm event as this form is never show.
At run time:
- Create a new child from TMultiDoc.NewChild
- Create a child form with the new childdoc as owner.
- Assign the main panel to the Dockedpanel property.
Convert a Delphi MDI application
Converting a MDI application is simplified by the availability of the same component for Delphi and Kylix.
Convert 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.
Replace the standard MDI function as below:
MDIChildCount -> MultiDoc1.ChildCount ActiveMdiChild -> MultiDoc1.ActiveObject or MultiDoc1.ActiveChild MDIChildren[i] -> MultiDoc1.Childs[i].DockedObject or MultiDoc1.Childs[i]
The Delphi component is include in the package. Unzip multidoc-delphi.zip and install MultiDocD6.dpk or MultiDocK3.dpk.