Changeset 186 for Docking/CoolDocking/UCoolDocking.pas
- Timestamp:
- Mar 10, 2011, 1:32:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCoolDocking.pas
r185 r186 27 27 TCoolDockConjoinForm = class(TCoolDockConjoinFormBase) 28 28 public 29 Panel: TPanel;30 29 CoolDockClient: TCoolDockClient; 31 30 procedure FormShow(Sender : TObject); … … 35 34 private 36 35 procedure SetName(const NewName: TComponentName); override; 37 procedure PanelVisibleChange(Sender: TObject);38 36 end; 39 37 … … 287 285 NewForm: TForm; 288 286 begin 289 if (FDockSite is TForm) then begin287 if (FDockSite is TForm) and (not (FDockSite is TCoolDockConjoinForm)) then begin 290 288 if (not Assigned(FDockSite.Parent)) then begin 291 289 // Create conjointed form 292 290 NewConjoinDockForm := CreateContainer(InsertAt); 293 FDockSite.ManualDock(NewConjoinDockForm .Panel);294 Control.ManualDock(NewConjoinDockForm .Panel, nil, InsertAt);291 FDockSite.ManualDock(NewConjoinDockForm); 292 Control.ManualDock(NewConjoinDockForm, nil, InsertAt); 295 293 end else begin 296 294 NewConjoinDockForm := CreateContainer(InsertAt); … … 298 296 // FDockSite.ManualFloat(FDockSite.BoundsRect); 299 297 NewConjoinDockForm.ManualDock(NewDockSite, nil, InsertAt); 300 FDockSite.ManualDock(NewConjoinDockForm .Panel);301 Control.ManualDock(NewConjoinDockForm .Panel, nil, InsertAt);298 FDockSite.ManualDock(NewConjoinDockForm); 299 Control.ManualDock(NewConjoinDockForm, nil, InsertAt); 302 300 end; 303 301 end else 304 if (FDockSite is T Panel) or (FDockSite is TCoolDockClientPanel) then begin302 if (FDockSite is TCoolDockConjoinForm) or (FDockSite is TPanel) or (FDockSite is TCoolDockClientPanel) then begin 305 303 InsertControlPanel(Control, InsertAt, DropCtl); 306 304 end; … … 479 477 procedure TCoolDockConjoinForm.FormShow(Sender: TObject); 480 478 begin 481 Panel.Show; 482 TCoolDockManager(Panel.DockManager).Visible := True; 479 TCoolDockManager(DockManager).Visible := True; 483 480 end; 484 481 … … 487 484 I: Integer; 488 485 begin 489 Panel.Hide; 490 TCoolDockManager(Panel.DockManager).Visible := False; 486 TCoolDockManager(DockManager).Visible := False; 491 487 // Hide all docked childs 492 with TCoolDockManager( Panel.DockManager) do488 with TCoolDockManager(DockManager) do 493 489 for I := 0 to DockPanels.Count - 1 do 494 490 if Assigned(TCoolDockClientPanel(DockPanels[I]).Control) then begin … … 501 497 begin 502 498 inherited CreateNew(TheOwner); 503 Panel := TPanel.Create(Self);504 with Panel do begin505 Parent := Self;506 Caption := '';507 DockSite := True;508 UseDockManager := True;509 Align := alClient;510 BevelOuter := bvNone;511 BevelInner := bvNone;512 // Color := clYellow;513 end;514 499 CoolDockClient := TCoolDockClient.Create(Self); 515 500 with CoolDockClient do begin 516 Panel := Self.Panel;517 501 end; 518 502 OnShow := FormShow; 519 503 OnHide := FormHide; 520 521 Panel.AddHandlerOnVisibleChanged(PanelVisibleChange);522 504 end; 523 505 524 506 destructor TCoolDockConjoinForm.Destroy; 525 507 begin 526 Panel.RemoveHandlerOnVisibleChanged(PanelVisibleChange);527 508 inherited; 528 509 end; … … 531 512 begin 532 513 inherited SetName(NewName); 533 Panel.Name := Name + 'Panel';534 Panel.Caption := '';535 514 CoolDockClient.Name := Name + 'CoolDockClient'; 536 end;537 538 procedure TCoolDockConjoinForm.PanelVisibleChange(Sender: TObject);539 begin540 Visible := Panel.Visible;541 515 end; 542 516
Note:
See TracChangeset
for help on using the changeset viewer.