Changeset 216 for Docking/CoolDocking


Ignore:
Timestamp:
Mar 22, 2011, 9:49:17 AM (14 years ago)
Author:
george
Message:
  • Added: ConjoinForms caption update.
  • Fixed: Docking new clients to TCDManagerRegions in different direction create new sub conjoin form.
Location:
Docking/CoolDocking
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/Demo/IDE/IDE.lpi

    r215 r216  
    4747      </Item4>
    4848    </RequiredPackages>
    49     <Units Count="49">
     49    <Units Count="50">
    5050      <Unit0>
    5151        <Filename Value="IDE.lpr"/>
    5252        <IsPartOfProject Value="True"/>
    5353        <UnitName Value="IDE"/>
     54        <EditorIndex Value="8"/>
    5455        <WindowIndex Value="0"/>
    5556        <TopLine Value="10"/>
    56         <CursorPos X="26" Y="20"/>
    57         <UsageCount Value="314"/>
     57        <CursorPos X="1" Y="34"/>
     58        <UsageCount Value="314"/>
     59        <Loaded Value="True"/>
    5860      </Unit0>
    5961      <Unit1>
     
    106108      <Unit5>
    107109        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
    108         <WindowIndex Value="0"/>
    109         <TopLine Value="209"/>
    110         <CursorPos X="18" Y="230"/>
     110        <EditorIndex Value="10"/>
     111        <WindowIndex Value="0"/>
     112        <TopLine Value="3934"/>
     113        <CursorPos X="1" Y="3955"/>
    111114        <UsageCount Value="144"/>
     115        <Loaded Value="True"/>
    112116      </Unit5>
    113117      <Unit6>
     
    219223        <Filename Value="..\..\UCDLayout.pas"/>
    220224        <UnitName Value="UCDLayout"/>
    221         <WindowIndex Value="0"/>
    222         <TopLine Value="344"/>
    223         <CursorPos X="43" Y="365"/>
    224         <UsageCount Value="48"/>
     225        <EditorIndex Value="13"/>
     226        <WindowIndex Value="0"/>
     227        <TopLine Value="361"/>
     228        <CursorPos X="44" Y="374"/>
     229        <UsageCount Value="49"/>
     230        <Loaded Value="True"/>
    225231      </Unit16>
    226232      <Unit17>
     
    238244        <TopLine Value="22"/>
    239245        <CursorPos X="26" Y="32"/>
    240         <UsageCount Value="17"/>
     246        <UsageCount Value="18"/>
    241247        <Loaded Value="True"/>
    242248      </Unit18>
     
    246252        <EditorIndex Value="6"/>
    247253        <WindowIndex Value="0"/>
    248         <TopLine Value="1143"/>
    249         <CursorPos X="3" Y="865"/>
     254        <TopLine Value="512"/>
     255        <CursorPos X="26" Y="525"/>
    250256        <UsageCount Value="124"/>
    251257        <Loaded Value="True"/>
     
    253259      <Unit20>
    254260        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\wincontrol.inc"/>
    255         <WindowIndex Value="0"/>
    256         <TopLine Value="7762"/>
    257         <CursorPos X="1" Y="7775"/>
     261        <EditorIndex Value="9"/>
     262        <WindowIndex Value="0"/>
     263        <TopLine Value="6263"/>
     264        <CursorPos X="1" Y="6280"/>
    258265        <UsageCount Value="111"/>
     266        <Loaded Value="True"/>
    259267      </Unit20>
    260268      <Unit21>
     
    276284        <TopLine Value="1"/>
    277285        <CursorPos X="32" Y="12"/>
    278         <UsageCount Value="46"/>
     286        <UsageCount Value="47"/>
    279287        <Loaded Value="True"/>
    280288      </Unit22>
     
    290298        <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    291299        <UnitName Value="UCDManagerTabs"/>
    292         <EditorIndex Value="8"/>
    293         <WindowIndex Value="0"/>
    294         <TopLine Value="76"/>
    295         <CursorPos X="3" Y="82"/>
     300        <EditorIndex Value="14"/>
     301        <WindowIndex Value="0"/>
     302        <TopLine Value="26"/>
     303        <CursorPos X="28" Y="36"/>
    296304        <UsageCount Value="130"/>
    297305        <Loaded Value="True"/>
     
    303311        <EditorIndex Value="7"/>
    304312        <WindowIndex Value="0"/>
    305         <TopLine Value="296"/>
    306         <CursorPos X="43" Y="312"/>
     313        <TopLine Value="231"/>
     314        <CursorPos X="12" Y="244"/>
    307315        <UsageCount Value="129"/>
    308316        <Loaded Value="True"/>
     
    335343        <EditorIndex Value="4"/>
    336344        <WindowIndex Value="0"/>
    337         <TopLine Value="55"/>
    338         <CursorPos X="8" Y="67"/>
     345        <TopLine Value="84"/>
     346        <CursorPos X="5" Y="97"/>
    339347        <UsageCount Value="105"/>
    340348        <Loaded Value="True"/>
     
    343351        <Filename Value="..\..\UCDConjoinForm.pas"/>
    344352        <UnitName Value="UCDConjoinForm"/>
    345         <WindowIndex Value="0"/>
    346         <TopLine Value="32"/>
    347         <CursorPos X="31" Y="34"/>
     353        <EditorIndex Value="12"/>
     354        <WindowIndex Value="0"/>
     355        <TopLine Value="33"/>
     356        <CursorPos X="1" Y="46"/>
    348357        <UsageCount Value="164"/>
     358        <Loaded Value="True"/>
    349359      </Unit29>
    350360      <Unit30>
     
    492502      <Unit48>
    493503        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\custompage.inc"/>
    494         <EditorIndex Value="9"/>
    495         <WindowIndex Value="0"/>
    496         <TopLine Value="111"/>
    497         <CursorPos X="71" Y="120"/>
    498         <UsageCount Value="10"/>
    499         <Loaded Value="True"/>
     504        <WindowIndex Value="0"/>
     505        <TopLine Value="113"/>
     506        <CursorPos X="15" Y="119"/>
     507        <UsageCount Value="11"/>
    500508      </Unit48>
     509      <Unit49>
     510        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\stdctrls.pp"/>
     511        <UnitName Value="StdCtrls"/>
     512        <EditorIndex Value="11"/>
     513        <WindowIndex Value="0"/>
     514        <TopLine Value="1447"/>
     515        <CursorPos X="14" Y="1460"/>
     516        <UsageCount Value="11"/>
     517        <Loaded Value="True"/>
     518      </Unit49>
    501519    </Units>
    502520    <JumpHistory Count="30" HistoryIndex="29">
    503521      <Position1>
    504         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    505         <Caret Line="412" Column="1" TopLine="398"/>
     522        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     523        <Caret Line="3931" Column="1" TopLine="3916"/>
    506524      </Position1>
    507525      <Position2>
    508         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    509         <Caret Line="414" Column="9" TopLine="398"/>
     526        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     527        <Caret Line="3932" Column="1" TopLine="3922"/>
    510528      </Position2>
    511529      <Position3>
    512         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    513         <Caret Line="410" Column="21" TopLine="398"/>
     530        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     531        <Caret Line="3939" Column="1" TopLine="3922"/>
    514532      </Position3>
    515533      <Position4>
    516         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    517         <Caret Line="18" Column="13" TopLine="3"/>
     534        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     535        <Caret Line="3942" Column="1" TopLine="3922"/>
    518536      </Position4>
    519537      <Position5>
    520         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    521         <Caret Line="9" Column="23" TopLine="5"/>
     538        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     539        <Caret Line="3945" Column="1" TopLine="3924"/>
    522540      </Position5>
    523541      <Position6>
    524         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    525         <Caret Line="18" Column="18" TopLine="5"/>
     542        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     543        <Caret Line="3946" Column="1" TopLine="3925"/>
    526544      </Position6>
    527545      <Position7>
    528         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    529         <Caret Line="426" Column="1" TopLine="407"/>
     546        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     547        <Caret Line="3948" Column="1" TopLine="3927"/>
    530548      </Position7>
    531549      <Position8>
    532         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    533         <Caret Line="83" Column="1" TopLine="70"/>
     550        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     551        <Caret Line="3951" Column="1" TopLine="3930"/>
    534552      </Position8>
    535553      <Position9>
    536         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    537         <Caret Line="157" Column="1" TopLine="144"/>
     554        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     555        <Caret Line="3952" Column="1" TopLine="3931"/>
    538556      </Position9>
    539557      <Position10>
    540         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    541         <Caret Line="206" Column="1" TopLine="193"/>
     558        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     559        <Caret Line="3953" Column="1" TopLine="3932"/>
    542560      </Position10>
    543561      <Position11>
    544         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    545         <Caret Line="157" Column="14" TopLine="144"/>
     562        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     563        <Caret Line="3954" Column="1" TopLine="3933"/>
    546564      </Position11>
    547565      <Position12>
    548         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    549         <Caret Line="418" Column="54" TopLine="393"/>
     566        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     567        <Caret Line="3955" Column="1" TopLine="3934"/>
    550568      </Position12>
    551569      <Position13>
    552         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    553         <Caret Line="410" Column="1" TopLine="399"/>
     570        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     571        <Caret Line="220" Column="1" TopLine="215"/>
    554572      </Position13>
    555573      <Position14>
    556         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    557         <Caret Line="411" Column="1" TopLine="399"/>
     574        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     575        <Caret Line="221" Column="1" TopLine="215"/>
    558576      </Position14>
    559577      <Position15>
    560         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    561         <Caret Line="412" Column="1" TopLine="399"/>
     578        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     579        <Caret Line="222" Column="1" TopLine="215"/>
    562580      </Position15>
    563581      <Position16>
    564         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    565         <Caret Line="413" Column="1" TopLine="399"/>
     582        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     583        <Caret Line="225" Column="1" TopLine="215"/>
    566584      </Position16>
    567585      <Position17>
    568         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    569         <Caret Line="414" Column="1" TopLine="399"/>
     586        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     587        <Caret Line="226" Column="1" TopLine="215"/>
    570588      </Position17>
    571589      <Position18>
    572         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    573         <Caret Line="415" Column="1" TopLine="399"/>
     590        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     591        <Caret Line="229" Column="1" TopLine="215"/>
    574592      </Position18>
    575593      <Position19>
    576         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    577         <Caret Line="416" Column="1" TopLine="399"/>
     594        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     595        <Caret Line="231" Column="13" TopLine="215"/>
    578596      </Position19>
    579597      <Position20>
    580         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    581         <Caret Line="417" Column="1" TopLine="399"/>
     598        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     599        <Caret Line="232" Column="1" TopLine="215"/>
    582600      </Position20>
    583601      <Position21>
    584         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    585         <Caret Line="421" Column="1" TopLine="400"/>
     602        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     603        <Caret Line="233" Column="1" TopLine="215"/>
    586604      </Position21>
    587605      <Position22>
    588         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    589         <Caret Line="87" Column="1" TopLine="74"/>
     606        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     607        <Caret Line="243" Column="14" TopLine="220"/>
    590608      </Position22>
    591609      <Position23>
    592         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    593         <Caret Line="412" Column="1" TopLine="399"/>
     610        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     611        <Caret Line="201" Column="1" TopLine="188"/>
    594612      </Position23>
    595613      <Position24>
    596         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    597         <Caret Line="87" Column="93" TopLine="74"/>
     614        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     615        <Caret Line="203" Column="1" TopLine="188"/>
    598616      </Position24>
    599617      <Position25>
    600         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    601         <Caret Line="86" Column="1" TopLine="74"/>
     618        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     619        <Caret Line="230" Column="12" TopLine="217"/>
    602620      </Position25>
    603621      <Position26>
    604         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    605         <Caret Line="412" Column="1" TopLine="399"/>
     622        <Filename Value="..\..\UCDManager.pas"/>
     623        <Caret Line="128" Column="24" TopLine="115"/>
    606624      </Position26>
    607625      <Position27>
    608         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    609         <Caret Line="16" Column="37" TopLine="7"/>
     626        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     627        <Caret Line="231" Column="15" TopLine="217"/>
    610628      </Position27>
    611629      <Position28>
    612         <Filename Value="..\..\UCDManager.pas"/>
    613         <Caret Line="78" Column="71" TopLine="53"/>
     630        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     631        <Caret Line="201" Column="18" TopLine="188"/>
    614632      </Position28>
    615633      <Position29>
    616         <Filename Value="..\..\UCDManager.pas"/>
    617         <Caret Line="264" Column="38" TopLine="262"/>
     634        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     635        <Caret Line="205" Column="34" TopLine="188"/>
    618636      </Position29>
    619637      <Position30>
    620638        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    621         <Caret Line="66" Column="17" TopLine="59"/>
     639        <Caret Line="231" Column="5" TopLine="218"/>
    622640      </Position30>
    623641    </JumpHistory>
     
    660678  </CompilerOptions>
    661679  <Debugging>
     680    <BreakPoints Count="1">
     681      <Item1>
     682        <Source Value="..\..\Managers\UCDManagerRegions.pas"/>
     683        <Line Value="202"/>
     684      </Item1>
     685    </BreakPoints>
    662686    <Watches Count="1">
    663687      <Item1>
  • Docking/CoolDocking/Managers/UCDManagerRegions.pas

    r215 r216  
    8080    //Canvas.FillRect(R);
    8181    if Visible then begin
    82       if ControlPanel.DockClientCount = 0 then
    83         Header.DrawGrabber(Canvas, Control) else
    84       Header.DrawGrabber(Canvas, ControlPanel);
     82      Header.Invalidate;
    8583    end;
    8684  end;
     
    201199        // Direction change, create conjoin form
    202200        NewConjoinDockForm := CreateContainer(InsertAt);
    203         NewDockSite := DockSite.HostDockSite;
    204         // FDockSite.ManualFloat(FDockSite.BoundsRect);
    205         NewConjoinDockForm.ManualDock(NewDockSite);
    206         Control.ManualDock(NewConjoinDockForm, nil, InsertAt);
    207         if DockSite is TForm then
    208           DockSite.ManualDock(NewConjoinDockForm)
    209         else
    210         if DockSite is TPanel then
    211           DockSite.Parent.ManualDock(NewConjoinDockForm);
     201        FreeParentIfEmpty := False;
     202        for I := DockSite.DockClientCount - 1 downto 0 do begin
     203          DockSite.DockClients[I].ManualDock(NewConjoinDockForm);
     204        end;
     205        FreeParentIfEmpty := True;
     206        NewConjoinDockForm.ManualDock(DockSite);
     207        Control.ManualDock(DockSite, nil, InsertAt);
     208        NewConjoinDockForm.UpdateCaption;
    212209        UpdateClientSize;
    213210        Exit;
     
    233230
    234231  //if TCDManager(Manager).DockSite.DockClientCount = 2 then FDockDirection := ddNone;
    235   if ClientCount = 1 then begin
     232  if FreeParentIfEmpty and (ClientCount = 1) then begin
    236233    // Last removed control => Free parent if it is TCDConjoinForm
    237234    if Self.DockSite is TCDConjoinForm then
     
    241238      end else TCDManagerItem(DockItems[0]).Control.ManualFloat(Rect(Left, Top, Left + Width, Top + Height));
    242239      ManualFloat(Rect(Left, Top, Left + Width, Top + Height));
     240      inherited RemoveControl(Control);
    243241      Free;
     242      Exit;
    244243    end;
    245244  end;
  • Docking/CoolDocking/Managers/UCDManagerTabs.pas

    r215 r216  
    9090  // Show current dock clients in parent dock sites
    9191  if TControl(Sender).Visible then
    92     TControl(Sender).HostDockSite.Visible := True;
     92    if Assigned(TControl(Sender).HostDockSite) then
     93      TControl(Sender).HostDockSite.Visible := True;
    9394
    9495  {Temp := TControl(Sender);
     
    271272  if Assigned(ManagerItem) then begin
    272273    Control.RemoveHandlerOnVisibleChanged(ManagerItem.VisibleChange);
    273   end;
     274  end else raise Exception.Create(Format('Control %s not found in DockItems', [Control.Name]));
    274275
    275276  DockItems.Remove(ManagerItem);
     
    285286      end else TCDManagerItem(DockItems[0]).Control.ManualFloat(Rect(Left, Top, Left + Width, Top + Height));
    286287      ManualFloat(Rect(Left, Top, Left + Width, Top + Height));
     288      //UpdateClientSize;
     289      inherited RemoveControl(Control);
    287290      Free;
    288     end;
    289   end else UpdateClientSize;
     291      Exit;
     292    end;
     293  end;
     294  //if ClientCount > 0 then
     295  UpdateClientSize;
    290296  inherited RemoveControl(Control);
    291297end;
     
    346352
    347353  while PageControl.PageList.Count > DockItems.Count do begin
    348     TCDManagerTabsItem(DockItems[I]).Control.Parent := nil;
    349     PageControl.Pages[PageControl.PageCount - 1].Parent := nil;
     354//    TCDManagerTabsItem(DockItems[DockItems.Count - 1]).Control.Visible := False;
     355//    TCDManagerTabsItem(DockItems[DockItems.Count - 1]).Control.Parent := nil;
     356    //PageControl.Pages[PageControl.PageCount - 1].Parent := nil;
    350357    PageControl.Pages[PageControl.PageCount - 1].Free;
    351358    TabImageList.Delete(TabImageList.Count - 1);
  • Docking/CoolDocking/UCDConjoinForm.pas

    r194 r216  
    1414  public
    1515    CoolDockClient: TCDClientBase;
     16    procedure UpdateCaption;
    1617    procedure FormShow(Sender : TObject);
    1718    procedure FormHide(Sender : TObject);
     
    2930
    3031{ TCDConjoinForm }
     32
     33procedure TCDConjoinForm.UpdateCaption;
     34var
     35  NewCaption: string;
     36  I: Integer;
     37begin
     38  NewCaption := '';
     39  for I := 0 to DockClientCount - 1 do begin
     40    //if DockClients[I] is TCDConjoinForm then
     41    //  TCDConjoinForm(DockClients[I]).UpdateCaption;
     42    NewCaption := NewCaption + DockClients[I].Caption + ', ';
     43  end;
     44  Caption := Copy(NewCaption, 1, Length(NewCaption) - 2);
     45
     46  if Assigned(HostDockSite) and (HostDockSite is TCDConjoinForm) then
     47    TCDConjoinForm(HostDockSite).UpdateCaption;
     48end;
    3149
    3250procedure TCDConjoinForm.FormShow(Sender: TObject);
  • Docking/CoolDocking/UCDLayout.pas

    r208 r216  
    368368  UndockSize.X := Form.UndockWidth;
    369369  UndockSize.Y := Form.UndockHeight;
    370   Visible := Form.Visible;
     370  Visible := Form.Visible or (TCDHideType(Form.Tag) = dhtTemporal);
    371371  Rect.Left := Form.Left;
    372372  Rect.Top := Form.Top;
  • Docking/CoolDocking/UCDManager.pas

    r215 r216  
    3838    Icon: TImage;
    3939    ManagerItem: TCDManagerItem;
    40     procedure DrawGrabber(Canvas: TCanvas; AControl: TControl);
    4140    constructor Create(TheOwner: TComponent); override;
    4241    destructor Destroy; override;
     
    9695    PopupMenu: TCDPopupMenu;
    9796    FDockStyle: TCDStyleType;
     97    FreeParentIfEmpty: Boolean; // Free or not parent conjoin forms
    9898    constructor Create(ADockSite: TWinControl); override;
    9999    destructor Destroy; override;
     
    325325  FDockSite := ADockSite;
    326326
     327  FreeParentIfEmpty := True;
     328
    327329  FDockStyle := dsList; // dsNone
    328330  FHeaderVisible := True;
     
    389391      FDockSite.ManualDock(NewConjoinDockForm);
    390392      Control.ManualDock(NewConjoinDockForm, nil, InsertAt);
     393      NewConjoinDockForm.UpdateCaption;
    391394    end else begin
    392395      NewConjoinDockForm := CreateContainer(InsertAt);
     
    396399      FDockSite.ManualDock(NewConjoinDockForm);
    397400      Control.ManualDock(NewConjoinDockForm, nil, InsertAt);
     401      NewConjoinDockForm.UpdateCaption;
    398402    end;
    399403  end else
     
    401405    InsertControlPanel(Control, InsertAt, DropCtl);
    402406  end;
     407  if FDockSite is TCDConjoinForm then
     408    TCDConjoinForm(FDockSite).UpdateCaption;
    403409
    404410//  FDockPanel.Invalidate;
     
    451457procedure TCDManager.RemoveControl(Control: TControl);
    452458begin
     459  if FDockSite is TCDConjoinForm then
     460    TCDConjoinForm(FDockSite).UpdateCaption;
    453461end;
    454462
     
    625633end;
    626634
    627 procedure TCDHeader.DrawGrabber(Canvas: TCanvas; AControl: TControl);
    628 begin
    629   with Canvas do begin
    630     Brush.Color := clBtnFace;
    631     Pen.Color := clBlack;
    632     //FillRect(0, 0, AControl.Width, GrabberSize);
    633 
    634     if (AControl as TWinControl).Focused then
    635       Title.Font.Style := Font.Style + [fsBold]
    636       else Title.Font.Style := Font.Style - [fsBold];
    637     Rectangle(1, 1, AControl.Width - 1, GrabberSize - 1);
    638     if Icon.Picture.Width > 0 then Title.Left := 8 + Icon.Picture.Width
    639       else Title.Left := 6;
    640     Title.Caption := AControl.Caption;
    641     RearrangeButtons;
    642   end;
    643 end;
    644 
    645635procedure TCDHeader.PaintExecute(Sender: TObject);
    646636const
     
    653643  Points: array of TPoint;
    654644begin
     645  if (ManagerItem.Control as TWinControl).Focused then
     646  Title.Font.Style := Font.Style + [fsBold]
     647  else Title.Font.Style := Font.Style - [fsBold];
     648
     649  if Icon.Picture.Width > 0 then Title.Left := 8 + Icon.Picture.Width
     650    else Title.Left := 6;
     651  Title.Caption := ManagerItem.Control.Caption;
     652  RearrangeButtons;
     653
    655654  with Canvas do begin
    656655    GradientFill(Rect(Border, Border, Width - Border,
Note: See TracChangeset for help on using the changeset viewer.