Ignore:
Timestamp:
Sep 17, 2010, 8:02:32 AM (14 years ago)
Author:
george
Message:
  • Upraveno: Ukotvení do podoken předěláno s využitím panelů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DockManager/Lazarus/Demo/UMainForm.pas

    r44 r46  
    1818    procedure Button1Click(Sender: TObject);
    1919    procedure FormCreate(Sender: TObject);
     20    procedure FormDestroy(Sender: TObject);
    2021    procedure FormShow(Sender: TObject);
    2122  private
     
    2324  public
    2425    FormIndex: Integer;
    25     LastDockForm: TDockForm;
     26    DockForms: TList;
    2627    function NewDockForm: TDockForm;
    2728  end;
     
    3839procedure TMainForm.FormCreate(Sender: TObject);
    3940begin
     41  DockForms := TList.Create;
     42end;
     43
     44procedure TMainForm.FormDestroy(Sender: TObject);
     45begin
     46  DockForms.Free;
    4047end;
    4148
     
    4653  DockForm3: TDockForm;
    4754begin
    48   DockForm1 := NewDockForm;
    49   DockForm1.ManualDock(Panel1);
    50 
    51   DockForm2 := NewDockForm;
    52   DockForm2.ManualDock(Panel1);
    53 
    54   DockForm3 := NewDockForm;
    55   DockForm3.ManualDock(DockForm2);
     55  NewDockForm.ManualDock(Panel1);
     56  NewDockForm.ManualDock(Panel1, nil, alBottom);
     57  NewDockForm.ManualDock(TForm(DockForms[1]).Parent);
     58  NewDockForm.ManualDock(TForm(DockForms[1]).Parent);
    5659end;
    5760
     
    6770  Inc(FormIndex);
    6871  Result.Show;
     72  DockForms.Add(Result);
    6973end;
    7074
Note: See TracChangeset for help on using the changeset viewer.