Changeset 207 for Docking/CoolDocking/UCDManager.pas
- Timestamp:
- Mar 18, 2011, 11:05:39 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCDManager.pas
r199 r207 48 48 private 49 49 FHeaderPos: THeaderPos; 50 FShowHeader: Boolean;50 function GetHeaderVisible: Boolean; 51 51 procedure SetHeaderPos(const AValue: THeaderPos); 52 procedure SetHeaderVisible(const AValue: Boolean); 52 53 public 53 54 Header: TCDHeader; 54 55 ControlPanel: TPanel; 55 property ShowHeader: Boolean read FShowHeader write FShowHeader;56 56 property HeaderPos: THeaderPos read FHeaderPos write SetHeaderPos; 57 property HeaderVisible: Boolean read GetHeaderVisible write SetHeaderVisible; 57 58 constructor Create(TheOwner: TComponent); 58 59 destructor Destroy; override; … … 81 82 FDockSite: TWinControl; 82 83 FHeaderPos: THeaderPos; 84 FHeaderVisible: Boolean; 83 85 function GetDockSite: TWinControl; 84 86 function GetMoveDuration: Integer; 85 87 procedure SetDockStyle(const AValue: TCDStyleType); 88 procedure SetHeaderVisible(const AValue: Boolean); 86 89 procedure SetMoveDuration(const AValue: Integer); 87 90 procedure SetVisible(const AValue: Boolean); … … 129 132 property DockSite: TWinControl read GetDockSite; 130 133 property HeaderPos: THeaderPos read GetHeaderPos write SetHeaderPos; 134 property HeaderVisible: Boolean read FHeaderVisible write SetHeaderVisible; 131 135 property Visible: Boolean write SetVisible; 132 136 end; … … 173 177 FHeaderPos:=AValue; 174 178 //Paint(Self); 179 end; 180 181 function TCDPanelHeader.GetHeaderVisible: Boolean; 182 begin 183 Result := Header.Visible; 184 end; 185 186 procedure TCDPanelHeader.SetHeaderVisible(const AValue: Boolean); 187 begin 188 Header.Visible := AValue; 175 189 end; 176 190 … … 185 199 Align := alClient; 186 200 187 ShowHeader := True;188 201 ControlPanel := TPanel.Create(Self); 189 202 with ControlPanel do begin … … 200 213 with Header do begin 201 214 Parent := Self; 202 Visible := ShowHeader;215 Visible := True; 203 216 Align := alTop; 204 217 Height := GrabberSize; … … 208 221 //BevelInner := bvNone; 209 222 //BevelOuter := bvNone; 223 HeaderVisible := True; 210 224 end; 211 225 … … 330 344 331 345 FDockStyle := dsList; // dsNone 346 FHeaderVisible := True; 332 347 PopupMenu := TCDPopupMenu.Create(Self); 333 348 PopupMenu.Parent := ADockSite; … … 536 551 NewManager.UpdateClientSize; 537 552 end; 553 end; 554 555 procedure TCDManager.SetHeaderVisible(const AValue: Boolean); 556 begin 557 if FHeaderVisible = AValue then Exit; 558 FHeaderVisible := AValue; 559 if Assigned(DockSite.HostDockSite) then 560 TCDManager(DockSite.HostDockSite.DockManager).UpdateClientSize; 538 561 end; 539 562
Note:
See TracChangeset
for help on using the changeset viewer.