Changeset 216 for Docking/CoolDocking/UCDManager.pas
- Timestamp:
- Mar 22, 2011, 9:49:17 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCDManager.pas
r215 r216 38 38 Icon: TImage; 39 39 ManagerItem: TCDManagerItem; 40 procedure DrawGrabber(Canvas: TCanvas; AControl: TControl);41 40 constructor Create(TheOwner: TComponent); override; 42 41 destructor Destroy; override; … … 96 95 PopupMenu: TCDPopupMenu; 97 96 FDockStyle: TCDStyleType; 97 FreeParentIfEmpty: Boolean; // Free or not parent conjoin forms 98 98 constructor Create(ADockSite: TWinControl); override; 99 99 destructor Destroy; override; … … 325 325 FDockSite := ADockSite; 326 326 327 FreeParentIfEmpty := True; 328 327 329 FDockStyle := dsList; // dsNone 328 330 FHeaderVisible := True; … … 389 391 FDockSite.ManualDock(NewConjoinDockForm); 390 392 Control.ManualDock(NewConjoinDockForm, nil, InsertAt); 393 NewConjoinDockForm.UpdateCaption; 391 394 end else begin 392 395 NewConjoinDockForm := CreateContainer(InsertAt); … … 396 399 FDockSite.ManualDock(NewConjoinDockForm); 397 400 Control.ManualDock(NewConjoinDockForm, nil, InsertAt); 401 NewConjoinDockForm.UpdateCaption; 398 402 end; 399 403 end else … … 401 405 InsertControlPanel(Control, InsertAt, DropCtl); 402 406 end; 407 if FDockSite is TCDConjoinForm then 408 TCDConjoinForm(FDockSite).UpdateCaption; 403 409 404 410 // FDockPanel.Invalidate; … … 451 457 procedure TCDManager.RemoveControl(Control: TControl); 452 458 begin 459 if FDockSite is TCDConjoinForm then 460 TCDConjoinForm(FDockSite).UpdateCaption; 453 461 end; 454 462 … … 625 633 end; 626 634 627 procedure TCDHeader.DrawGrabber(Canvas: TCanvas; AControl: TControl);628 begin629 with Canvas do begin630 Brush.Color := clBtnFace;631 Pen.Color := clBlack;632 //FillRect(0, 0, AControl.Width, GrabberSize);633 634 if (AControl as TWinControl).Focused then635 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.Width639 else Title.Left := 6;640 Title.Caption := AControl.Caption;641 RearrangeButtons;642 end;643 end;644 645 635 procedure TCDHeader.PaintExecute(Sender: TObject); 646 636 const … … 653 643 Points: array of TPoint; 654 644 begin 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 655 654 with Canvas do begin 656 655 GradientFill(Rect(Border, Border, Width - Border,
Note:
See TracChangeset
for help on using the changeset viewer.