- Timestamp:
- Mar 22, 2011, 8:20:18 AM (14 years ago)
- Location:
- Docking/CoolDocking
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Demo/IDE/IDE.lpi
r213 r215 47 47 </Item4> 48 48 </RequiredPackages> 49 <Units Count="4 8">49 <Units Count="49"> 50 50 <Unit0> 51 51 <Filename Value="IDE.lpr"/> … … 63 63 <ResourceBaseClass Value="Form"/> 64 64 <UnitName Value="UMainForm"/> 65 <EditorIndex Value=" 2"/>65 <EditorIndex Value="1"/> 66 66 <WindowIndex Value="0"/> 67 67 <TopLine Value="90"/> … … 106 106 <Unit5> 107 107 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 108 <EditorIndex Value="12"/>109 108 <WindowIndex Value="0"/> 110 109 <TopLine Value="209"/> 111 110 <CursorPos X="18" Y="230"/> 112 111 <UsageCount Value="144"/> 113 <Loaded Value="True"/>114 112 </Unit5> 115 113 <Unit6> … … 126 124 <Unit7> 127 125 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\customform.inc"/> 128 <EditorIndex Value="13"/>129 126 <WindowIndex Value="0"/> 130 127 <TopLine Value="1350"/> 131 128 <CursorPos X="1" Y="1363"/> 132 129 <UsageCount Value="97"/> 133 <Loaded Value="True"/>134 130 </Unit7> 135 131 <Unit8> … … 213 209 <Filename Value="..\..\UCDClient.pas"/> 214 210 <UnitName Value="UCDClient"/> 215 <EditorIndex Value=" 3"/>211 <EditorIndex Value="2"/> 216 212 <WindowIndex Value="0"/> 217 213 <TopLine Value="81"/> … … 238 234 <Filename Value="..\..\Common\URectangle.pas"/> 239 235 <UnitName Value="URectangle"/> 240 <EditorIndex Value=" 4"/>236 <EditorIndex Value="3"/> 241 237 <WindowIndex Value="0"/> 242 238 <TopLine Value="22"/> … … 250 246 <EditorIndex Value="6"/> 251 247 <WindowIndex Value="0"/> 252 <TopLine Value=" 503"/>253 <CursorPos X="3 5" Y="512"/>248 <TopLine Value="1143"/> 249 <CursorPos X="3" Y="865"/> 254 250 <UsageCount Value="124"/> 255 251 <Loaded Value="True"/> … … 257 253 <Unit20> 258 254 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\wincontrol.inc"/> 259 <EditorIndex Value="15"/>260 255 <WindowIndex Value="0"/> 261 256 <TopLine Value="7762"/> 262 257 <CursorPos X="1" Y="7775"/> 263 258 <UsageCount Value="111"/> 264 <Loaded Value="True"/>265 259 </Unit20> 266 260 <Unit21> … … 278 272 <Filename Value="..\..\UCDCommon.pas"/> 279 273 <UnitName Value="UCDCommon"/> 280 <WindowIndex Value="0"/> 281 <TopLine Value="13"/> 282 <CursorPos X="18" Y="26"/> 274 <EditorIndex Value="5"/> 275 <WindowIndex Value="0"/> 276 <TopLine Value="1"/> 277 <CursorPos X="32" Y="12"/> 283 278 <UsageCount Value="46"/> 279 <Loaded Value="True"/> 284 280 </Unit22> 285 281 <Unit23> … … 294 290 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 295 291 <UnitName Value="UCDManagerTabs"/> 296 <IsVisibleTab Value="True"/> 297 <EditorIndex Value="10"/> 298 <WindowIndex Value="0"/> 299 <TopLine Value="270"/> 300 <CursorPos X="1" Y="292"/> 292 <EditorIndex Value="8"/> 293 <WindowIndex Value="0"/> 294 <TopLine Value="76"/> 295 <CursorPos X="3" Y="82"/> 301 296 <UsageCount Value="130"/> 302 297 <Loaded Value="True"/> … … 305 300 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 306 301 <UnitName Value="UCDManagerRegions"/> 307 <EditorIndex Value="9"/> 308 <WindowIndex Value="0"/> 309 <TopLine Value="277"/> 310 <CursorPos X="3" Y="293"/> 302 <IsVisibleTab Value="True"/> 303 <EditorIndex Value="7"/> 304 <WindowIndex Value="0"/> 305 <TopLine Value="296"/> 306 <CursorPos X="43" Y="312"/> 311 307 <UsageCount Value="129"/> 312 308 <Loaded Value="True"/> … … 337 333 <Filename Value="..\..\UCDManager.pas"/> 338 334 <UnitName Value="UCDManager"/> 339 <EditorIndex Value=" 5"/>340 <WindowIndex Value="0"/> 341 <TopLine Value=" 467"/>342 <CursorPos X=" 1" Y="472"/>335 <EditorIndex Value="4"/> 336 <WindowIndex Value="0"/> 337 <TopLine Value="55"/> 338 <CursorPos X="8" Y="67"/> 343 339 <UsageCount Value="105"/> 344 340 <Loaded Value="True"/> … … 347 343 <Filename Value="..\..\UCDConjoinForm.pas"/> 348 344 <UnitName Value="UCDConjoinForm"/> 349 <EditorIndex Value="14"/>350 345 <WindowIndex Value="0"/> 351 346 <TopLine Value="32"/> 352 347 <CursorPos X="31" Y="34"/> 353 348 <UsageCount Value="164"/> 354 <Loaded Value="True"/>355 349 </Unit29> 356 350 <Unit30> … … 425 419 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\lclproc.pas"/> 426 420 <UnitName Value="LCLProc"/> 427 <EditorIndex Value="11"/>428 421 <WindowIndex Value="0"/> 429 422 <TopLine Value="1531"/> 430 423 <CursorPos X="1" Y="1544"/> 431 424 <UsageCount Value="91"/> 432 <Loaded Value="True"/>433 425 </Unit38> 434 426 <Unit39> 435 427 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\dragmanager.inc"/> 436 <EditorIndex Value="16"/>437 428 <WindowIndex Value="0"/> 438 429 <TopLine Value="553"/> 439 430 <CursorPos X="79" Y="568"/> 440 431 <UsageCount Value="76"/> 441 <Loaded Value="True"/>442 432 </Unit39> 443 433 <Unit40> 444 434 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\lclmessageglue.pas"/> 445 435 <UnitName Value="LCLMessageGlue"/> 446 <EditorIndex Value="19"/>447 436 <WindowIndex Value="0"/> 448 437 <TopLine Value="101"/> 449 438 <CursorPos X="1" Y="122"/> 450 439 <UsageCount Value="76"/> 451 <Loaded Value="True"/>452 440 </Unit40> 453 441 <Unit41> 454 442 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\interfaces\win32\win32proc.pp"/> 455 443 <UnitName Value="win32proc"/> 456 <EditorIndex Value="20"/>457 444 <WindowIndex Value="0"/> 458 445 <TopLine Value="756"/> 459 446 <CursorPos X="1" Y="771"/> 460 447 <UsageCount Value="76"/> 461 <Loaded Value="True"/>462 448 </Unit41> 463 449 <Unit42> 464 450 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\interfaces\win32\win32wscontrols.pp"/> 465 451 <UnitName Value="Win32WSControls"/> 466 <EditorIndex Value="21"/>467 452 <WindowIndex Value="0"/> 468 453 <TopLine Value="474"/> 469 454 <CursorPos X="1" Y="488"/> 470 455 <UsageCount Value="76"/> 471 <Loaded Value="True"/>472 456 </Unit42> 473 457 <Unit43> 474 458 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\pagecontrol.inc"/> 475 <EditorIndex Value="1"/>476 459 <WindowIndex Value="0"/> 477 460 <TopLine Value="112"/> 478 461 <CursorPos X="23" Y="123"/> 479 462 <UsageCount Value="76"/> 480 <Loaded Value="True"/>481 463 </Unit43> 482 464 <Unit44> 483 465 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\customcontrol.inc"/> 484 <EditorIndex Value="17"/>485 466 <WindowIndex Value="0"/> 486 467 <TopLine Value="48"/> 487 468 <CursorPos X="1" Y="61"/> 488 469 <UsageCount Value="76"/> 489 <Loaded Value="True"/>490 470 </Unit44> 491 471 <Unit45> 492 472 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\scrollingwincontrol.inc"/> 493 <EditorIndex Value="18"/>494 473 <WindowIndex Value="0"/> 495 474 <TopLine Value="233"/> 496 475 <CursorPos X="1" Y="256"/> 497 476 <UsageCount Value="76"/> 498 <Loaded Value="True"/>499 477 </Unit45> 500 478 <Unit46> 501 479 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\dragobject.inc"/> 502 <EditorIndex Value="8"/>503 480 <WindowIndex Value="0"/> 504 481 <TopLine Value="60"/> 505 482 <CursorPos X="3" Y="62"/> 506 483 <UsageCount Value="10"/> 507 <Loaded Value="True"/>508 484 </Unit46> 509 485 <Unit47> 510 486 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\dragimagelist.inc"/> 511 <EditorIndex Value="7"/>512 487 <WindowIndex Value="0"/> 513 488 <TopLine Value="103"/> 514 489 <CursorPos X="3" Y="109"/> 515 490 <UsageCount Value="10"/> 516 <Loaded Value="True"/>517 491 </Unit47> 492 <Unit48> 493 <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"/> 500 </Unit48> 518 501 </Units> 519 502 <JumpHistory Count="30" HistoryIndex="29"> 520 503 <Position1> 521 <Filename Value="..\..\Managers\UCDManager Regions.pas"/>522 <Caret Line=" 286" Column="1" TopLine="271"/>504 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 505 <Caret Line="412" Column="1" TopLine="398"/> 523 506 </Position1> 524 507 <Position2> 525 <Filename Value="..\..\Managers\UCDManager Regions.pas"/>526 <Caret Line=" 289" Column="1" TopLine="271"/>508 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 509 <Caret Line="414" Column="9" TopLine="398"/> 527 510 </Position2> 528 511 <Position3> 529 <Filename Value="..\..\Managers\UCDManager Regions.pas"/>530 <Caret Line=" 290" Column="1" TopLine="277"/>512 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 513 <Caret Line="410" Column="21" TopLine="398"/> 531 514 </Position3> 532 515 <Position4> 533 <Filename Value="..\..\Managers\UCDManager Regions.pas"/>534 <Caret Line=" 291" Column="1" TopLine="277"/>516 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 517 <Caret Line="18" Column="13" TopLine="3"/> 535 518 </Position4> 536 519 <Position5> 537 <Filename Value=" UMainForm.pas"/>538 <Caret Line=" 102" Column="27" TopLine="90"/>520 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 521 <Caret Line="9" Column="23" TopLine="5"/> 539 522 </Position5> 540 523 <Position6> 541 <Filename Value="..\..\ UCDClient.pas"/>542 <Caret Line=" 90" Column="1" TopLine="81"/>524 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 525 <Caret Line="18" Column="18" TopLine="5"/> 543 526 </Position6> 544 527 <Position7> 545 <Filename Value=" E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\wincontrol.inc"/>546 <Caret Line=" 7775" Column="1" TopLine="7762"/>528 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 529 <Caret Line="426" Column="1" TopLine="407"/> 547 530 </Position7> 548 531 <Position8> 549 <Filename Value="..\..\ UCDManager.pas"/>550 <Caret Line=" 126" Column="20" TopLine="113"/>532 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 533 <Caret Line="83" Column="1" TopLine="70"/> 551 534 </Position8> 552 535 <Position9> 553 <Filename Value="..\..\ UCDManager.pas"/>554 <Caret Line="1 14" Column="44" TopLine="101"/>536 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 537 <Caret Line="157" Column="1" TopLine="144"/> 555 538 </Position9> 556 539 <Position10> 557 <Filename Value="..\..\ UCDManager.pas"/>558 <Caret Line=" 115" Column="18" TopLine="101"/>540 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 541 <Caret Line="206" Column="1" TopLine="193"/> 559 542 </Position10> 560 543 <Position11> 561 <Filename Value=" E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>562 <Caret Line=" 230" Column="18" TopLine="209"/>544 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 545 <Caret Line="157" Column="14" TopLine="144"/> 563 546 </Position11> 564 547 <Position12> 565 <Filename Value=" E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\controls.pp"/>566 <Caret Line=" 153" Column="23" TopLine="142"/>548 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 549 <Caret Line="418" Column="54" TopLine="393"/> 567 550 </Position12> 568 551 <Position13> 569 <Filename Value=" E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\controls.pp"/>570 <Caret Line=" 512" Column="35" TopLine="503"/>552 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 553 <Caret Line="410" Column="1" TopLine="399"/> 571 554 </Position13> 572 555 <Position14> 573 556 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 574 <Caret Line=" 293" Column="1" TopLine="280"/>557 <Caret Line="411" Column="1" TopLine="399"/> 575 558 </Position14> 576 559 <Position15> 577 560 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 578 <Caret Line=" 294" Column="1" TopLine="280"/>561 <Caret Line="412" Column="1" TopLine="399"/> 579 562 </Position15> 580 563 <Position16> 581 564 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 582 <Caret Line=" 293" Column="1" TopLine="280"/>565 <Caret Line="413" Column="1" TopLine="399"/> 583 566 </Position16> 584 567 <Position17> 585 568 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 586 <Caret Line=" 294" Column="1" TopLine="280"/>569 <Caret Line="414" Column="1" TopLine="399"/> 587 570 </Position17> 588 571 <Position18> 589 572 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 590 <Caret Line=" 291" Column="24" TopLine="269"/>573 <Caret Line="415" Column="1" TopLine="399"/> 591 574 </Position18> 592 575 <Position19> 593 576 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 594 <Caret Line=" 293" Column="1" TopLine="272"/>577 <Caret Line="416" Column="1" TopLine="399"/> 595 578 </Position19> 596 579 <Position20> 597 580 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 598 <Caret Line=" 294" Column="1" TopLine="273"/>581 <Caret Line="417" Column="1" TopLine="399"/> 599 582 </Position20> 600 583 <Position21> 601 584 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 602 <Caret Line=" 282" Column="1" TopLine="273"/>585 <Caret Line="421" Column="1" TopLine="400"/> 603 586 </Position21> 604 587 <Position22> 605 588 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 606 <Caret Line=" 283" Column="1" TopLine="273"/>589 <Caret Line="87" Column="1" TopLine="74"/> 607 590 </Position22> 608 591 <Position23> 609 592 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 610 <Caret Line=" 284" Column="1" TopLine="273"/>593 <Caret Line="412" Column="1" TopLine="399"/> 611 594 </Position23> 612 595 <Position24> 613 596 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 614 <Caret Line=" 285" Column="1" TopLine="273"/>597 <Caret Line="87" Column="93" TopLine="74"/> 615 598 </Position24> 616 599 <Position25> 617 600 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 618 <Caret Line=" 293" Column="1" TopLine="273"/>601 <Caret Line="86" Column="1" TopLine="74"/> 619 602 </Position25> 620 603 <Position26> 621 604 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 622 <Caret Line=" 294" Column="1" TopLine="273"/>605 <Caret Line="412" Column="1" TopLine="399"/> 623 606 </Position26> 624 607 <Position27> 625 608 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 626 <Caret Line=" 285" Column="38" TopLine="273"/>609 <Caret Line="16" Column="37" TopLine="7"/> 627 610 </Position27> 628 611 <Position28> 629 <Filename Value="..\..\ Managers\UCDManagerTabs.pas"/>630 <Caret Line=" 288" Column="1" TopLine="273"/>612 <Filename Value="..\..\UCDManager.pas"/> 613 <Caret Line="78" Column="71" TopLine="53"/> 631 614 </Position28> 632 615 <Position29> 633 <Filename Value="..\..\ Managers\UCDManagerTabs.pas"/>634 <Caret Line="2 91" Column="1" TopLine="273"/>616 <Filename Value="..\..\UCDManager.pas"/> 617 <Caret Line="264" Column="38" TopLine="262"/> 635 618 </Position29> 636 619 <Position30> 637 <Filename Value="..\..\ UCDManager.pas"/>638 <Caret Line=" 472" Column="1" TopLine="467"/>620 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 621 <Caret Line="66" Column="17" TopLine="59"/> 639 622 </Position30> 640 623 </JumpHistory> -
Docking/CoolDocking/Managers/UCDManagerRegions.pas
r213 r215 60 60 begin 61 61 inherited VisibleChange(Sender); 62 PanelHeader.Visible := Control.Visible; 63 Manager.UpdateClientSize; 62 with TCDManagerRegions(Manager) do begin 63 //if TControl(Sender).Visible then begin 64 // TCDManagerRegionsItem(DockItems[DockItems.IndexOf(FindControlInPanels(TControl(Sender)))]).HideType := dhtPermanent; 65 //end; 66 UpdateClientSize; 67 end; 64 68 end; 65 69 … … 306 310 PanelHeader.Header.Visible := TCDManager(TWinControl(Control).DockManager).HeaderVisible; 307 311 PanelHeader.Header.Title.Caption := TForm(Control).Caption; 312 PanelHeader.Visible := Control.Visible; 308 313 Paint(Self); 309 314 if I < (DockItems.Count - 1) then PanelHeader.Align := BaseAlign -
Docking/CoolDocking/Managers/UCDManagerTabs.pas
r213 r215 18 18 constructor Create; override; 19 19 destructor Destroy; override; 20 procedure VisibleChange(Sender: TObject); override; 20 21 end; 21 22 … … 73 74 end; 74 75 76 procedure TCDManagerTabsItem.VisibleChange(Sender: TObject); 77 var 78 ControlVisible: Boolean; 79 Temp: TControl; 80 Temp2: TControl; 81 begin 82 with TCDManagerTabs(Manager) do begin 83 if TControl(Sender).Visible then begin 84 Switch(DockItems.IndexOf(FindControlInPanels(TControl(Sender)))); 85 TCDManagerTabsItem(DockItems[DockItems.IndexOf(FindControlInPanels(TControl(Sender)))]).HideType := dhtPermanent; 86 end; 87 UpdateClientSize; 88 end; 89 90 // Show current dock clients in parent dock sites 91 if TControl(Sender).Visible then 92 TControl(Sender).HostDockSite.Visible := True; 93 94 {Temp := TControl(Sender); 95 if Assigned(Control) then 96 begin 97 ControlVisible := TControl(Sender).Visible; 98 (*if Assigned(ClientAreaPanel) then 99 ClientAreaPanel.Visible := ControlVisible; 100 if Assigned(Splitter) then 101 Splitter.Visible := ControlVisible; 102 *) 103 // if Assigned(TCDManager(OwnerDockManager).DockStyleHandler) then 104 if Assigned(Manager) then 105 with TCDManagerTabs(Manager) do 106 begin 107 //UpdateClientSize; 108 if ControlVisible then 109 Switch(FDockItems.IndexOf(FindControlInPanels(TControl(Sender)))); 110 if not (Control is TWinControl) then raise Exception.Create('Not TWinControl'); 111 if not Assigned(Control) then raise Exception.Create('Control not assigned'); 112 ChangeVisible(TWinControl(Control), ControlVisible); 113 // Show parent control 114 Temp := TControl(Sender).HostDockSite; 115 116 if ControlVisible then 117 TControl(Sender).HostDockSite.Visible := ControlVisible; 118 end; 119 if csDestroying in Control.ComponentState then Control := nil; 120 end; 121 } 122 end; 123 75 124 { TCDManagerTabs } 76 125 … … 104 153 105 154 procedure TCDManagerTabs.TabControlChange(Sender: TObject); 106 var 107 I: Integer; 108 begin 109 //UpdateClientSize; 110 { // Hide all clients 111 for I := 0 to DockItems.Count - 1 do 112 if TCDManagerItem(DockItems[I]).Control.Visible 113 //and (PageControl.TabIndex <> I) 114 then 115 begin 116 TCDManagerItem(DockItems[I]).Control.Tag := Integer(dhtTemporal); 117 TCDManagerItem(DockItems[I]).Control.Hide; 118 //TCDClientPanel(DockItems[I]).ClientAreaPanel.Hide; 119 //TCDClientPanel(DockItems[I]).ClientAreaPanel.Parent := PageControl.Pages[I]; 120 //TCDClientPanel(DockPanels[I]).ClientAreaPanel.Parent := DockSite; 121 TCDManagerItem(DockItems[I]).Control.Align := alClient; 122 //TCDClientPanel(DockPanels[I]).Control.Parent := 123 // TCDClientPanel(DockPanels[I]).ClientAreaPanel; 124 //ShowMessage(TCDClientPanel(DockPanels[I]).Control.ClassName); 125 //Application.ProcessMessages; 126 127 // Workaround for "Cannot focus" error 128 TForm(TCDManagerItem(DockItems[I]).Control).ActiveControl := nil; 129 end; 130 131 // Show selected 132 if (PageControl.TabIndex <> -1) and (DockItems.Count > PageControl.TabIndex) 133 // and not TCDClientPanel(DockPanels[PageControl.TabIndex]).Control.Visible 134 then begin 135 with TCDManagerItem(DockItems[PageControl.TabIndex]) do begin 136 Control.Show; 137 (*AutoHide.Enable := True; 138 if AutoHide.Enable then begin 139 //Parent := nil; 140 Visible := True; 141 if AutoHide.ControlVisible then begin 142 AutoHide.Hide; 143 end; 144 AutoHide.Control := Control; 145 AutoHide.Show; 146 end else begin 147 *) 148 //Parent := DockSite; 149 //Show; 150 Visible := True; 151 UpdateClientSize; 152 // end; 153 end; 154 //TCDClientPanel(FDockPanels[TabControl.TabIndex]).Visible := True; 155 end; 156 MouseDownSkip := True; } 155 begin 156 UpdateClientSize; 157 MouseDownSkip := True; 157 158 end; 158 159 … … 208 209 Images := TabImageList; 209 210 end; 210 //TabsPos := hpTop;211 //MoveDuration := 1000; // ms212 211 213 212 //PageControl.Visible := True; … … 342 341 for I := 0 to DockItems.Count - 1 do 343 342 with TCDManagerTabsItem(DockItems[I]) do begin 344 Control.Visible := False;345 Control.Parent := nil;343 //Control.Visible := False; 344 //Control.Parent := nil; 346 345 end; 347 346 348 347 while PageControl.PageList.Count > DockItems.Count do begin 349 //PageControl.Pages[PageControl.PageCount - 1].Parent := nil; 348 TCDManagerTabsItem(DockItems[I]).Control.Parent := nil; 349 PageControl.Pages[PageControl.PageCount - 1].Parent := nil; 350 350 PageControl.Pages[PageControl.PageCount - 1].Free; 351 351 TabImageList.Delete(TabImageList.Count - 1); … … 364 364 Control.Parent := PageControl.Pages[I]; 365 365 Control.Align := alClient; 366 Control.Visible := True; 367 PageControl.Pages[I].TabVisible := Control.Visible; 366 if PageControl.PageIndex = I then begin 367 if (not Control.Visible) and (HideType = dhtTemporal) then 368 Control.Visible := True; 369 end else begin 370 if Control.Visible then begin 371 HideType := dhtTemporal; 372 Control.Visible := False; 373 end; 374 end; 375 PageControl.Pages[I].TabVisible := Control.Visible or (HideType = dhtTemporal); 368 376 //TCDClientPanel(DockPanels[I]).ClientAreaPanel.Width := DockSite.Width; 369 377 //TCDClientPanel(DockPanels[I]).ClientAreaPanel.Height := DockSite.Height - PageControl.Height; … … 409 417 I := DockItems.IndexOf(FindControlInPanels(Control)); 410 418 if Control.Tag = Integer(dhtPermanent) then 411 if I <> -1then419 if (I <> -1) and (I < PageControl.PageCount) then 412 420 // Control.Hide; 413 421 PageControl.Page[I].TabVisible := False; -
Docking/CoolDocking/UCDManager.pas
r209 r215 64 64 TCDManagerItem = class 65 65 private 66 function GetHideType: TCDHideType; 66 67 procedure ResizeExecute(Sender: TObject); 68 procedure SetHideType(const AValue: TCDHideType); 67 69 public 68 70 Control: TControl; … … 74 76 constructor Create; virtual; 75 77 destructor Destroy; override; 78 property HideType: TCDHideType read GetHideType write SetHideType; 76 79 end; 77 80 … … 240 243 end; 241 244 245 function TCDManagerItem.GetHideType: TCDHideType; 246 begin 247 Result := TCDHideType(Control.Tag); 248 end; 249 242 250 procedure TCDManagerItem.ResizeExecute(Sender: TObject); 243 251 begin … … 252 260 end; 253 261 262 procedure TCDManagerItem.SetHideType(const AValue: TCDHideType); 263 begin 264 Control.Tag := Integer(AValue); 265 end; 266 254 267 procedure TCDManagerItem.DockPanelMouseDown(Sender: TObject; 255 268 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); … … 277 290 278 291 procedure TCDManagerItem.VisibleChange(Sender: TObject); 279 var 280 ControlVisible: Boolean; 281 Temp: TControl; 282 Temp2: TControl; 283 begin 284 285 { Temp := TControl(Sender); 286 if Assigned(Control) then 287 begin 288 ControlVisible := TControl(Sender).Visible; 289 (*if Assigned(ClientAreaPanel) then 290 ClientAreaPanel.Visible := ControlVisible; 291 if Assigned(Splitter) then 292 Splitter.Visible := ControlVisible; 293 *) 294 // if Assigned(TCDManager(OwnerDockManager).DockStyleHandler) then 295 if Assigned(Manager) then 296 with TCDManager(Manager) do 297 begin 298 //UpdateClientSize; 299 if ControlVisible then 300 Switch(DockItems.IndexOf(FindControlInPanels(TControl(Sender)))); 301 if not (Control is TWinControl) then raise Exception.Create('Not TWinControl'); 302 if not Assigned(Control) then raise Exception.Create('Control not assigned'); 303 ChangeVisible(TWinControl(Control), ControlVisible); 304 // Show parent control 305 Temp := TControl(Sender).HostDockSite; 306 307 if ControlVisible then 308 TControl(Sender).HostDockSite.Visible := ControlVisible; 309 end; 310 if csDestroying in Control.ComponentState then Control := nil; 311 end;} 292 begin 312 293 end; 313 294
Note:
See TracChangeset
for help on using the changeset viewer.