Prevent a dkTool client from docking to a panel used for just dkDocument clients?

My form is basically a center panel with several dkDocument clients in tabs.  Around the that center panel I have a bunch of dkTool clients.  Is there any way to prevent a dkTool client from docking to the panel containing all my dkDocument clients?


  • 2 Comments sorted by Votes Date Added
  • You can use Site.OnDockOver event for this.
  • Not much documentation that I could find on this event, so I took a stab at it anyway with some help from your dock demo.  Seems a bit lengthy but seems to work.  Is there a better way?

      if (Source.Control is TLMDDockPanel) and
        (TLMDDockPanel(Source.Control).ClientKind = dkTool) and
        (AZone.Kind = zkTabs) and (AZone.Tabs[0].Zone <> nil) and
        (AZone.Tabs[0].Zone.Kind = zkPanel) and
        (AZone.Tabs[0].Zone.Panel.ClientKind = dkDocument) then
        Accept := false;

Sign In or Register to comment.