Docking TToolbar

I'm trying to get the toolbar to dock at the bottom or side of a window.
When I undock it from the top of the window, it will float outside the
confines of the window, and actually becomes a window itself.  How do I make
it stay inside my window, and allow the users to dock on bottom or side?