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/UCustomDockManager.pas

    r45 r46  
    3131    Control: TControl;
    3232    Splitter: TSplitter;
     33    ClientAreaPanel: TPanel;
    3334    constructor Create(TheOwner: TComponent); override;
    3435    destructor Destroy; override;
     
    177178    end;
    178179    NewPanel.Control := Control;
    179     Control.Parent := NewPanel;
     180    Control.Parent := NewPanel.ClientAreaPanel;
     181    Control.Align := alClient;
    180182    FDockPanels.Add(NewPanel);
    181183
     
    202204      NewConjoinDockForm := TConjoinDockForm.Create(nil);
    203205      NewConjoinDockForm.Visible := True;
     206      NewConjoinDockForm.BoundsRect := FDockSite.BoundsRect;
    204207      Control.ManualDock(NewConjoinDockForm.Panel);
    205208      FDockSite.ManualDock(NewConjoinDockForm.Panel);
    206209    end else begin
    207       NewPanel := TPanel.Create(nil);
    208       NewPanel.Parent := FDockSite.Parent;
    209       NewPanel.Visible := True;
    210       NewPanel.Left := FDockSite.Left;
    211       NewPanel.Top := FDockSite.Top;
    212       NewPanel.Width := FDockSite.Width;
    213       NewPanel.Height := FDockSite.Height;
    214       NewPanel.UseDockManager := True;
    215       NewPanel.DockSite := True;
    216       NewPanel.Color := clGreen;
    217       NewPanel.ManualDock(FDockSite.HostDockSite);
    218 //      FDockSite.Parent := nil;
    219       Control.ManualDock(NewPanel);
    220       FDockSite.ManualDock(NewPanel);
     210      Control.ManualDock(FDockSite.Parent);
    221211    end;
    222212  end else
    223   if FDockSite is TPanel then begin
     213  if (FDockSite is TPanel) or (FDockSite is TDockClientPanel) then begin
    224214    InsertControlPanel(Control, InsertAt, DropCtl);
    225215  end;
     
    332322    OnClick := CloseButtonClick;
    333323  end;
     324  ClientAreaPanel := TPanel.Create(Self);
     325  with ClientAreaPanel do begin
     326    Parent := Self;
     327    Visible := True;
     328    DockSite := True;
     329    UseDockManager := True;
     330    Left := 0;
     331    Top := GrabberSize;
     332    Width := Self.Width;
     333    Height := Self.Height;
     334    Anchors := [akTop, akBottom, akLeft, akRight];
     335    BevelInner := bvNone;
     336    BevelOuter := bvNone;
     337  end;
    334338  OnPaint := DockPanelPaint;
    335339  OnMouseDown := DockPanelMouseDown;
Note: See TracChangeset for help on using the changeset viewer.