Changeset 208 for Docking/CoolDocking/Managers/UCDManagerTabsPopup.pas
- Timestamp:
- Mar 18, 2011, 1:24:37 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Managers/UCDManagerTabsPopup.pas
r207 r208 65 65 procedure UpdatePopupFormBounds; 66 66 procedure TabControlChange(Sender: TObject); override; 67 procedure PopupFormMouseLeave(Sender: TObject); 67 68 public 68 69 AutoHideEnabled: Boolean; … … 71 72 HeaderPanel: TCDPanelHeader; 72 73 Splitter: TPanel; 74 procedure RemoveControl(Control: TControl); override; 73 75 procedure SetHeaderPos(const AValue: THeaderPos); override; 74 76 procedure PinShowButtonClick(Sender: TObject); … … 253 255 end; 254 256 257 procedure TCDManagerTabsPopup.PopupFormMouseLeave(Sender: TObject); 258 begin 259 if PopupForm.Visible then AutoHide.Hide; 260 end; 261 262 procedure TCDManagerTabsPopup.RemoveControl(Control: TControl); 263 begin 264 if DockItems.Count <= 2 then 265 PageControl.OnResize := nil; 266 inherited; 267 end; 268 255 269 constructor TCDManagerTabsPopup.Create(ADockSite: TWinControl); 256 270 var … … 263 277 PopupForm.Visible := True; 264 278 PopupForm.BorderStyle := bsNone; 279 PopupForm.OnMouseLeave := PopupFormMouseLeave; 265 280 HeaderPanel := TCDPanelHeader.Create(nil); 266 281 HeaderPanel.Parent := PopupForm; … … 276 291 AutoHide.Control := PopupForm; 277 292 PageControl.OnResize := PageControlResize; 293 HeaderVisible := False; 278 294 279 295 for I := 0 to DockItems.Count - 1 do begin … … 288 304 AutoHide.Free; 289 305 PopupForm.Free; 306 Splitter.Free; 290 307 HeaderPanel.Free; 291 308 inherited Destroy; … … 306 323 NewItem := TCDManagerTabsPopupItem.Create; 307 324 with NewItem do begin 308 //Panel.Parent := Self.DockSite;309 325 Manager := Self; 310 //if DockStyle = dsList then Visible := True;311 //Align := alClient;312 //Header.PopupMenu := Self.PopupMenu;313 //PopupMenu.Parent := Self.DockSite;314 326 end; 315 327 if (Control is TForm) and Assigned((Control as TForm).Icon) then 316 NewItem.Icon .Picture.Assign((Control as TForm).Icon);328 NewItem.IconImage.Picture.Assign((Control as TForm).Icon); 317 329 318 330 NewItem.Control := Control; … … 323 335 DockItems.Insert(0, NewItem) 324 336 else DockItems.Add(NewItem); 325 326 end; 327 328 NewTabSheet := TTabSheet.Create(PageControl); 329 NewTabSheet.PageControl := PageControl; 330 NewTabSheet.Caption := Control.Caption; 331 NewTabSheet.ImageIndex := TabImageList.Count; 332 NewTabSheet.TabVisible := Control.Visible; 333 Control.Parent := NewTabSheet; 334 TabImageList.Add(NewItem.Icon.Picture.Bitmap, nil); 335 // if Assigned(NewItem.Splitter) then 336 // NewItem.Splitter.Visible := False; 337 // NewItem.ClientAreaPanel.Visible := False; 338 // NewItem.Visible := False; 339 //NewItem.Parent := NewTabSheet; 337 end; 340 338 end; 341 339
Note:
See TracChangeset
for help on using the changeset viewer.