Difference between revisions of "MultiDoc/de"

From Free Pascal wiki
Jump to navigationJump to search
Line 50: Line 50:
 
=== Verwendung ===
 
=== Verwendung ===
 
Zur Entwicklungszeit:
 
Zur Entwicklungszeit:
* On the application main form place a TMultiDoc.
+
* Platzieren sie auf dem Hauptformular ein TMultiDoc.
* Create a child form with a main TPanel.
+
* Erstellen sie ihr Unterformular auf einem Panel.
* Put all the object you want for the child to the panel, write the event, etc...
+
* Erstellen sie auf diesem Panel alle Objekte und fügen sie die gewünschten Ereignisse usw. hinzu
* Do not rely on some TForm event as this form is never show.
+
* Beziehen sie sich nicht auf die TForm-Events, da das Formular selbst nie gezeigt wird.
  
 
Zur Laufzeit:
 
Zur Laufzeit:
Line 59: Line 59:
 
* Create a child form with the new childdoc as owner.
 
* Create a child form with the new childdoc as owner.
 
* Assign the main panel to the Dockedpanel property.
 
* Assign the main panel to the Dockedpanel property.
 
  
 
=== Convert a Delphi MDI application ===
 
=== Convert a Delphi MDI application ===

Revision as of 13:34, 8 February 2007

Deutsch (de) English (en) español (es) português (pt)

Über

MultiDoc ist ein Lazarus Package zum Ersetzen des Standard MDI Interface.

Diese Komponente erlaubt das Schreiben von nachgebildeten MDI-Anwendungen. Es ist keine richtige Implementierung der MDI-Schnittstelle aber es ermöglicht die Nutzung vieler Unterformulare, welche in ihrer Größe geändert werden können. Es gibt 2 Komponenten:

  • TMultiDoc : Das Aufnahmegebiet für die Unterformulare auf dem Hauptformular
  • TChildDoc : Kapselung des Unterfomulars mit größenveränderbarer Border und Button

Verwendet wurde die Komponente in einer Graphiksoftware allerdings ist sie auch für viele andere Anwendung nützlich.

Screenshot

Multidoc demo.png

Autor

Patrick Chevalley

Lizenz

Modifizierte LGPL, siehe readme.txt

Download

Die Komponente und ein Demonstrationsprogramm sind zu finden im Lazarus-CCR Sourceforge Bereich.

Change Log

  • Version 0.2 2007/01/06 bereinigte folgendes:
    1. BorderWidth property not working
    2. Falsche Button-Reihenfolge
    3. Center the cursor to the title bar when moving the panel
    4. GTK2 und FPC 2.1.1 Kompatibilität
    5. Crash when closing a child using the close button
    6. Lizenz zu modifizierter LGPL geändert
  • Version 0.1 2006/01/20 Erstes Beta-Release.

Abhängigkeiten / Systemvoraussetzungen

Diese Komponente ist ausschließlich von Standardkomponenten abgeleitet (TPanel, TCustomSplitter, TSpeedButton) und sollte daher unter allen Plattformen ohne Anpassungen funktionieren.

Getestet wurde sie unter Linux und Windows.

Anmerkungen

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

  • Kompilieren und installieren sie multidocpackage.lpk
  • Öffnen sie das Beispiel demo/demomultidoc.lpi (Dieses Beispiel kann als Skelett für eine neue Anwendung verwendet werden.)

Verwendung

Zur Entwicklungszeit:

  • Platzieren sie auf dem Hauptformular ein TMultiDoc.
  • Erstellen sie ihr Unterformular auf einem Panel.
  • Erstellen sie auf diesem Panel alle Objekte und fügen sie die gewünschten Ereignisse usw. hinzu
  • Beziehen sie sich nicht auf die TForm-Events, da das Formular selbst nie gezeigt wird.

Zur Laufzeit:

  • 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]

Die Delphi Komponente ist im Package enthalten. Entpacken sie multidoc-delphi.zip und installieren MultiDocD6.dpk oder MultiDocK3.dpk.