How to change default delphi docked form title height?

delphi, delphi-xe2

Solution

The default appearance comes from `TCaptionedDockTree`. You can write your own descendant and assign it to `DefaultDockTreeClass` to replace it. To change the caption height, override `AdjustCaptionRect`. To change the actual drawing of the caption, override `GetDockCaptionDrawer` to return your own descendant of `TDockCaptionDrawer` with overriden `DrawDockCaption` and/or `DockCaptionHitTest` methods.

Problem

I dock form to the TPanel using standard delphi docking functions. And the title of docked form looks like this How can I modify its appearance?

Original source