Changeset 209 for Docking/CoolDocking/Managers
- Timestamp:
- Mar 18, 2011, 2:16:28 PM (14 years ago)
- Location:
- Docking/CoolDocking/Managers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Managers/UCDManagerRegions.pas
r207 r209 17 17 PanelHeader: TCDPanelHeader; 18 18 Splitter: TSplitter; 19 procedure VisibleChange(Sender: TObject); override; 19 20 procedure Paint(Sender: TObject); override; 20 21 constructor Create; … … 56 57 { TCDManagerRegionsItem } 57 58 59 procedure TCDManagerRegionsItem.VisibleChange(Sender: TObject); 60 begin 61 inherited VisibleChange(Sender); 62 PanelHeader.Visible := Control.Visible; 63 Manager.UpdateClientSize; 64 end; 65 58 66 procedure TCDManagerRegionsItem.Paint(Sender: TObject); 59 67 var … … 273 281 SplitterTop: Integer; 274 282 BaseAlign: TAlign; 283 VisibleControlsCount: Integer; 275 284 begin 276 285 inherited UpdateClientSize; … … 280 289 SplitterLeft := 0; 281 290 SplitterTop := 0; 291 VisibleControlsCount := DockSite.VisibleDockClientCount; 292 DockSite.Visible := VisibleControlsCount > 0; 293 if VisibleControlsCount = 0 then VisibleControlsCount := 1; 294 282 295 for I := 0 to DockItems.Count - 1 do 283 with TCDManagerRegionsItem(DockItems[I]) do begin 296 with TCDManagerRegionsItem(DockItems[I]) do 297 begin 284 298 PanelHeader.Left := SplitterLeft; 285 299 PanelHeader.Top := SplitterTop; 286 300 PanelHeader.Height := Self.DockSite.Height div 287 Self.DockSite.DockClientCount;301 VisibleControlsCount; 288 302 PanelHeader.Width := Self.DockSite.Width div 289 Self.DockSite.DockClientCount; 290 PanelHeader.Header.Visible := TCDManager(TWinControl(Control).DockManager).HeaderVisible; 303 VisibleControlsCount; 304 if Assigned(TWinControl(Control).DockManager) then 305 PanelHeader.Header.Visible := TCDManager(TWinControl(Control).DockManager).HeaderVisible; 291 306 PanelHeader.Header.Title.Caption := TForm(Control).Caption; 292 307 Paint(Self); -
Docking/CoolDocking/Managers/UCDManagerTabs.pas
r208 r209 34 34 procedure InsertControlPanel(AControl: TControl; InsertAt: TAlign; 35 35 DropCtl: TControl); override; 36 procedure UpdateClientSize; override;37 36 function FindControlInPanels(Control: TControl): TCDManagerItem; override; 38 37 function GetHeaderPos: THeaderPos; override; … … 41 40 TabImageList: TImageList; 42 41 PageControl: TPageControl; 42 procedure UpdateClientSize; override; 43 43 procedure SetHeaderPos(const AValue: THeaderPos); override; 44 44 procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign); virtual; … … 290 290 end; 291 291 inherited RemoveControl(Control); 292 if ClientCount > 1 then UpdateClientSize; 292 //if ClientCount > 0 then 293 UpdateClientSize; 293 294 end; 294 295 … … 348 349 349 350 while PageControl.PageList.Count > DockItems.Count do begin 350 PageControl.Pages[PageControl.PageCount - 1].Parent := nil;351 //PageControl.Pages[PageControl.PageCount - 1].Parent := nil; 351 352 PageControl.Pages[PageControl.PageCount - 1].Free; 352 353 TabImageList.Delete(TabImageList.Count - 1);
Note:
See TracChangeset
for help on using the changeset viewer.