Board index » delphi » how disable or hide docked window bar ?

how disable or hide docked window bar ?

When using dockable window child, I found out, that double-clicking its bar
maximizes it, but it cannot be restored later, but only minimized as regular
(undocked) window.
AFAIK there is no way to disable this (or to hide its bar, so that it could
not be doubleclicked).
Or is there?  Any hints?

Daniel
--
<sorry about my english>

 

Re:how disable or hide docked window bar ?


Quote
In article <7g6teu$l...@forums.borland.com>, Daniel Rott wrote:
> When using dockable window child, I found out, that double-clicking its bar
> maximizes it, but it cannot be restored later, but only minimized as regular
> (undocked) window.
> AFAIK there is no way to disable this (or to hide its bar, so that it could
> not be doubleclicked).
> Or is there?  Any hints?

I just did a little spelunking in the D4 VCL source. TControl has a protected
property named FloatingDockSiteClass: TwinControlClass which is initialized  
in TControl.Create as

  FFloatingDockSiteClass := TCustomDockForm;

So the path to changes is this: derive a new class from TCustomDockForm that
overrides the constructor and changes the border style to bsNone, for example.
Or handle the WM_SYSCOMMAND message and swallow it for the case (msg.cmdtype
and $FFF0) = SC_MAXIMIZE to prevent maximizing. Assign the class of this
new form to your dockable windows FloatingDockSiteClass property, preferrably
in an overriden Create constructor. It will now use your custom dock form when
floating.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads