Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

How to Prevent Panel from Floating

How can I prevent particular docking panels from floating? I want to allow them to dock into docking sites, but not float.

Thank you
Tagged:

Comments

  • 2 Comments sorted by Votes Date Added
  • Hi,

    First of all, I have to note that if you want to prevent panels from been undocked from the site, you need to set DragContent property of the docking style to False, because otherwise the panel is undocked at the draggin start, and, so, there nothing to do later. This can be done by modifying one of the existing styles (XML files). In VS2005 style DragContent is set to False by default, so you can try this style first.

    After that, you can use the following code:

    procedure TForm6.LMDDockSite1UnDock(Sender: TObject; Client: TControl;
      NewTarget: TWinControl; var Allow: Boolean);
    begin
      Allow := (NewTarget = LMDDockSite1);
    end;
Sign In or Register to comment.