LCL Drag Dock
From Free Pascal wiki
Jump to navigationJump to searchControls or entire forms in a GUI can be glued together and detached again. Such docking is similar to drag-drop, but differs in some aspects.
Docking Elements
In addition to the drag-drop players, some more players enter the scene:
- Dock sites
- Dock rectangles as visual feedback
- Docking manager
Dock Source
A control or form can be made dockable by setting its DragKind property to dkDock.
Dock Target
Docking requires special drop target zones, called dock sites. A TWinControl becomes a docking target by setting its DockSite property to True.
The DockRect
Usually a rectangular shape follows the mouse pointer in a docking operation, to distinguish it from a drag-drop operation. The difference becomes obvious when the mouse hovers over a dock site. Then the shape snaps to a possible drop location, in both position and size.