Ignore:
Timestamp:
Mar 23, 2011, 12:22:26 PM (13 years ago)
Author:
george
Message:
  • Fixed: Parent manager tabs switching.
File:
1 edited

Legend:

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

    r217 r218  
    2121    constructor Create;
    2222    destructor Destroy; override;
     23    procedure SetControl(const AValue: TWinControl); override;
    2324  end;
    2425
     
    4344    procedure PaintSite(DC: HDC); override;
    4445    procedure UpdateClientSize; override;
    45     procedure DoSetVisible(const AValue: Boolean); override;
     46    procedure SetVisible(const AValue: Boolean); override;
    4647    procedure ChangeVisible(Control: TWinControl; Visible: Boolean);
    4748    property DockDirection: TCDDirection read FDockDirection
     
    8889begin
    8990  PanelHeader := TCDPanelHeader.Create(nil);
    90   PanelHeader.Header.ManagerItem := Self;
     91//  PanelHeader.Header.ManagerItem := Self;
    9192  PanelHeader.Header.OnMouseDown := DockPanelMouseDown;
    9293  PanelHeader.Header.Icon.OnMouseDown := DockPanelMouseDown;
     
    109110  Control.Parent := nil;
    110111  inherited Destroy;
     112end;
     113
     114procedure TCDManagerRegionsItem.SetControl(const AValue: TWinControl);
     115begin
     116  inherited SetControl(AValue);
     117  PanelHeader.Header.Control := AValue;
    111118end;
    112119
     
    175182  NewItem.Control := TWinControl(Control);
    176183  Control.AddHandlerOnVisibleChanged(NewItem.VisibleChange);
     184  Control.AddHandlerOnVisibleChanging(NewItem.VisibleChanging);
    177185  Control.Parent := NewItem.PanelHeader.ControlPanel;
    178186  Control.Align := alClient;
     
    199207      if (NewDirection <> FDockDirection) then begin
    200208        // Direction change, create conjoin form
    201         NewConjoinDockForm := CreateContainer(InsertAt);
     209        NewConjoinDockForm := CreateConjoinForm;
    202210        try
    203211          FreeParentIfEmpty := False;
     
    228236  if Assigned(ManagerItem) then begin
    229237    Control.RemoveHandlerOnVisibleChanged(ManagerItem.VisibleChange);
     238    Control.RemoveHandlerOnVisibleChanging(ManagerItem.VisibleChanging);
    230239  end;
    231240
     
    335344end;
    336345
    337 procedure TCDManagerRegions.DoSetVisible(const AValue: Boolean);
     346procedure TCDManagerRegions.SetVisible(const AValue: Boolean);
    338347var
    339348  I: Integer;
     
    341350  inherited;
    342351  for I := 0 to DockItems.Count - 1 do
    343 
    344         //Show;
    345         //ShowMessage(IntToStr(Control.Tag));
    346352      with TCDManagerRegionsItem(DockItems[I]) do begin
    347353        if AValue and (not Control.Visible) and (Control.Tag = Integer(dhtTemporal))  then begin
Note: See TracChangeset for help on using the changeset viewer.