Changeset 215 for Docking/CoolDocking/UCDManager.pas
- Timestamp:
- Mar 22, 2011, 8:20:18 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.