Ignore:
Timestamp:
Mar 22, 2011, 11:32:28 AM (13 years ago)
Author:
george
Message:
  • Fixed: If control docked to panel owned by main form then it was possible to redock main form to conjoin form.
  • Modified: Header title is now painted to canvas instead of use of TLabel. This will be necessary to draw rotated text later.
  • Added: Length of header title is now reduced to not overlap to header buttons area.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/Managers/UCDManagerRegions.pas

    r216 r217  
    9090  PanelHeader.Header.ManagerItem := Self;
    9191  PanelHeader.Header.OnMouseDown := DockPanelMouseDown;
    92   PanelHeader.Header.Title.OnMouseDown := DockPanelMouseDown;
    9392  PanelHeader.Header.Icon.OnMouseDown := DockPanelMouseDown;
    9493
     
    123122begin
    124123  inherited SetHeaderPos(AValue);
    125   case AValue of
     124  if Assigned(DockSite.Parent) then
     125    TCDManager(DockSite.Parent.DockManager).UpdateClientSize;
     126(*  case AValue of
    126127    hpBottom, hpTop: FDockDirection := ddVertical;
    127128    hpLeft, hpRight: FDockDirection := ddHorizontal;
    128   end;
     129  end;*)
    129130end;
    130131
     
    172173  NewItem.PanelHeader.Parent := DockSite;
    173174
    174   NewItem.Control := Control;
     175  NewItem.Control := TWinControl(Control);
    175176  Control.AddHandlerOnVisibleChanged(NewItem.VisibleChange);
    176177  Control.Parent := NewItem.PanelHeader.ControlPanel;
     
    199200        // Direction change, create conjoin form
    200201        NewConjoinDockForm := CreateContainer(InsertAt);
    201         FreeParentIfEmpty := False;
    202         for I := DockSite.DockClientCount - 1 downto 0 do begin
    203           DockSite.DockClients[I].ManualDock(NewConjoinDockForm);
     202        try
     203          FreeParentIfEmpty := False;
     204          for I := DockSite.DockClientCount - 1 downto 0 do begin
     205            DockSite.DockClients[I].ManualDock(NewConjoinDockForm);
     206          end;
     207        finally
     208          FreeParentIfEmpty := True;
    204209        end;
    205         FreeParentIfEmpty := True;
    206210        NewConjoinDockForm.ManualDock(DockSite);
    207211        Control.ManualDock(DockSite, nil, InsertAt);
     
    308312    if Assigned(TWinControl(Control).DockManager) then
    309313      PanelHeader.Header.Visible := TCDManager(TWinControl(Control).DockManager).HeaderVisible;
    310     PanelHeader.Header.Title.Caption := TForm(Control).Caption;
    311314    PanelHeader.Visible := Control.Visible;
    312315    Paint(Self);
Note: See TracChangeset for help on using the changeset viewer.