Changeset 209 for Docking/CoolDocking/Managers/UCDManagerRegions.pas
- Timestamp:
- Mar 18, 2011, 2:16:28 PM (14 years ago)
- File:
-
- 1 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);
Note:
See TracChangeset
for help on using the changeset viewer.