Another variant.
This is what I actually originally had in mind. If you drag the blue panel, you can release it on the left, right or bottom panel. If you have moved the panel away from the form and not docked, you will get a new form. If you close this, you can make the panel visible again by pressing the button.
There is 1 great concern. If you click on a left, right or bottom panel, you get an AV. This refers to dramanager.inc rule 717. It says: AControl.BeforeDragStart; It seems that this is due to these lines.
TopDock.DockSite := True; BottomDock.DockSite := True; LeftDock.DockSite := True; RightDock.DockSite := True;
Even though there is no event linked to the panels, the onclck is still activated.
Does anyone have a tip to prevent that? I tried a tcustom panel provided with an empty mouseclickevent but even then I get the AV.